mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Adding vSphere Volume support for vSphere Cloud Provider
This commit is contained in:
@@ -180,6 +180,7 @@ func init() {
|
||||
DeepCopy_api_Volume,
|
||||
DeepCopy_api_VolumeMount,
|
||||
DeepCopy_api_VolumeSource,
|
||||
DeepCopy_api_VsphereVirtualDiskVolumeSource,
|
||||
DeepCopy_api_WeightedPodAffinityTerm,
|
||||
); err != nil {
|
||||
// if one of the deep copy functions is malformed, detect it immediately.
|
||||
@@ -1925,6 +1926,15 @@ func DeepCopy_api_PersistentVolumeSource(in PersistentVolumeSource, out *Persist
|
||||
} else {
|
||||
out.AzureFile = nil
|
||||
}
|
||||
if in.VsphereVolume != nil {
|
||||
in, out := in.VsphereVolume, &out.VsphereVolume
|
||||
*out = new(VsphereVirtualDiskVolumeSource)
|
||||
if err := DeepCopy_api_VsphereVirtualDiskVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.VsphereVolume = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3183,6 +3193,21 @@ func DeepCopy_api_VolumeSource(in VolumeSource, out *VolumeSource, c *conversion
|
||||
} else {
|
||||
out.ConfigMap = nil
|
||||
}
|
||||
if in.VsphereVolume != nil {
|
||||
in, out := in.VsphereVolume, &out.VsphereVolume
|
||||
*out = new(VsphereVirtualDiskVolumeSource)
|
||||
if err := DeepCopy_api_VsphereVirtualDiskVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.VsphereVolume = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_api_VsphereVirtualDiskVolumeSource(in VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, c *conversion.Cloner) error {
|
||||
out.VolumePath = in.VolumePath
|
||||
out.FSType = in.FSType
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -229,6 +229,8 @@ type VolumeSource struct {
|
||||
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
|
||||
// ConfigMap represents a configMap that should populate this volume
|
||||
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
|
||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
||||
}
|
||||
|
||||
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
||||
@@ -267,6 +269,8 @@ type PersistentVolumeSource struct {
|
||||
Flocker *FlockerVolumeSource `json:"flocker,omitempty"`
|
||||
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
|
||||
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
|
||||
// VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
|
||||
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"`
|
||||
}
|
||||
|
||||
type PersistentVolumeClaimVolumeSource struct {
|
||||
@@ -716,6 +720,16 @@ type AzureFileVolumeSource struct {
|
||||
ReadOnly bool `json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
// Represents a vSphere volume resource.
|
||||
type VsphereVirtualDiskVolumeSource struct {
|
||||
// Path that identifies vSphere volume vmdk
|
||||
VolumePath string `json:"volumePath"`
|
||||
// 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.
|
||||
FSType string `json:"fsType,omitempty"`
|
||||
}
|
||||
|
||||
// Adapts a ConfigMap into a volume.
|
||||
//
|
||||
// The contents of the target ConfigMap's Data field will be presented in a
|
||||
|
||||
Reference in New Issue
Block a user