Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vSphere Volume Plugin Implementation #24947

Merged
merged 2 commits into from
May 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions api/swagger-spec/apps_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,10 @@
"configMap": {
"$ref": "v1.ConfigMapVolumeSource",
"description": "ConfigMap represents a configMap that should populate this volume"
},
"vsphereVolume": {
"$ref": "v1.VsphereVirtualDiskVolumeSource",
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
}
}
},
Expand Down Expand Up @@ -1805,6 +1809,23 @@
}
}
},
"v1.VsphereVirtualDiskVolumeSource": {
"id": "v1.VsphereVirtualDiskVolumeSource",
"description": "Represents a vSphere volume resource.",
"required": [
"volumePath"
],
"properties": {
"volumePath": {
"type": "string",
"description": "Path that identifies vSphere volume vmdk"
},
"fsType": {
"type": "string",
"description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified."
}
}
},
"v1.Container": {
"id": "v1.Container",
"description": "A single application container that you want to run within a pod.",
Expand Down
21 changes: 21 additions & 0 deletions api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@
"configMap": {
"$ref": "v1.ConfigMapVolumeSource",
"description": "ConfigMap represents a configMap that should populate this volume"
},
"vsphereVolume": {
"$ref": "v1.VsphereVirtualDiskVolumeSource",
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
}
}
},
Expand Down Expand Up @@ -1810,6 +1814,23 @@
}
}
},
"v1.VsphereVirtualDiskVolumeSource": {
"id": "v1.VsphereVirtualDiskVolumeSource",
"description": "Represents a vSphere volume resource.",
"required": [
"volumePath"
],
"properties": {
"volumePath": {
"type": "string",
"description": "Path that identifies vSphere volume vmdk"
},
"fsType": {
"type": "string",
"description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified."
}
}
},
"v1.Container": {
"id": "v1.Container",
"description": "A single application container that you want to run within a pod.",
Expand Down
21 changes: 21 additions & 0 deletions api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6611,6 +6611,10 @@
"configMap": {
"$ref": "v1.ConfigMapVolumeSource",
"description": "ConfigMap represents a configMap that should populate this volume"
},
"vsphereVolume": {
"$ref": "v1.VsphereVirtualDiskVolumeSource",
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
}
}
},
Expand Down Expand Up @@ -7117,6 +7121,23 @@
}
}
},
"v1.VsphereVirtualDiskVolumeSource": {
"id": "v1.VsphereVirtualDiskVolumeSource",
"description": "Represents a vSphere volume resource.",
"required": [
"volumePath"
],
"properties": {
"volumePath": {
"type": "string",
"description": "Path that identifies vSphere volume vmdk"
},
"fsType": {
"type": "string",
"description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified."
}
}
},
"v1.Container": {
"id": "v1.Container",
"description": "A single application container that you want to run within a pod.",
Expand Down
25 changes: 25 additions & 0 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -16359,6 +16359,10 @@
"$ref": "v1.AzureFileVolumeSource",
"description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod."
},
"vsphereVolume": {
"$ref": "v1.VsphereVirtualDiskVolumeSource",
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
},
"accessModes": {
"type": "array",
"items": {
Expand Down Expand Up @@ -16731,6 +16735,23 @@
}
}
},
"v1.VsphereVirtualDiskVolumeSource": {
"id": "v1.VsphereVirtualDiskVolumeSource",
"description": "Represents a vSphere volume resource.",
"required": [
"volumePath"
],
"properties": {
"volumePath": {
"type": "string",
"description": "Path that identifies vSphere volume vmdk"
},
"fsType": {
"type": "string",
"description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified."
}
}
},
"v1.PersistentVolumeStatus": {
"id": "v1.PersistentVolumeStatus",
"description": "PersistentVolumeStatus is the current status of a persistent volume.",
Expand Down Expand Up @@ -16977,6 +16998,10 @@
"configMap": {
"$ref": "v1.ConfigMapVolumeSource",
"description": "ConfigMap represents a configMap that should populate this volume"
},
"vsphereVolume": {
"$ref": "v1.VsphereVirtualDiskVolumeSource",
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions cmd/kube-controller-manager/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ import (
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce"
"k8s.io/kubernetes/pkg/cloudprovider/providers/openstack"
"k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere"
"k8s.io/kubernetes/pkg/util/io"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/aws_ebs"
"k8s.io/kubernetes/pkg/volume/cinder"
"k8s.io/kubernetes/pkg/volume/gce_pd"
"k8s.io/kubernetes/pkg/volume/host_path"
"k8s.io/kubernetes/pkg/volume/nfs"
"k8s.io/kubernetes/pkg/volume/vsphere_volume"

"github.com/golang/glog"
)
Expand Down Expand Up @@ -79,6 +81,7 @@ func ProbeRecyclableVolumePlugins(config componentconfig.VolumeConfiguration) []
allPlugins = append(allPlugins, aws_ebs.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, gce_pd.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...)

return allPlugins
}
Expand All @@ -97,6 +100,8 @@ func NewVolumeProvisioner(cloud cloudprovider.Interface, config componentconfig.
return getProvisionablePluginFromVolumePlugins(gce_pd.ProbeVolumePlugins())
case cloud != nil && openstack.ProviderName == cloud.ProviderName():
return getProvisionablePluginFromVolumePlugins(cinder.ProbeVolumePlugins())
case cloud != nil && vsphere.ProviderName == cloud.ProviderName():
return getProvisionablePluginFromVolumePlugins(vsphere_volume.ProbeVolumePlugins())
}
return nil, nil
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/kubelet/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (
"k8s.io/kubernetes/pkg/volume/nfs"
"k8s.io/kubernetes/pkg/volume/rbd"
"k8s.io/kubernetes/pkg/volume/secret"
"k8s.io/kubernetes/pkg/volume/vsphere_volume"
// Cloud providers
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
)
Expand Down Expand Up @@ -80,6 +81,7 @@ func ProbeVolumePlugins(pluginDir string) []volume.VolumePlugin {
allPlugins = append(allPlugins, flexvolume.ProbeVolumePlugins(pluginDir)...)
allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, configmap.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...)
return allPlugins
}

Expand Down
50 changes: 49 additions & 1 deletion docs/api-reference/batch/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,47 @@ <h3 id="_v1_keytopath">v1.KeyToPath</h3>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_vspherevirtualdiskvolumesource">v1.VsphereVirtualDiskVolumeSource</h3>
<div class="paragraph">
<p>Represents a vSphere volume resource.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Path that identifies vSphere volume vmdk</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">fsType</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

</div>
<div class="sect2">
<h3 id="_v1_jobspec">v1.JobSpec</h3>
Expand Down Expand Up @@ -3147,6 +3188,13 @@ <h3 id="_v1_volume">v1.Volume</h3>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_configmapvolumesource">v1.ConfigMapVolumeSource</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">vsphereVolume</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_vspherevirtualdiskvolumesource">v1.VsphereVirtualDiskVolumeSource</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -3986,7 +4034,7 @@ <h3 id="_any">any</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-05-18 12:33:08 UTC
Last updated 2016-05-21 03:08:23 UTC
</div>
</div>
</body>
Expand Down
Loading