mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Add StorageOS volume plugin
This commit is contained in:
@@ -20,34 +20,46 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
)
|
||||
|
||||
func getClaimRefNamespace(pv *api.PersistentVolume) string {
|
||||
if pv.Spec.ClaimRef != nil {
|
||||
return pv.Spec.ClaimRef.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// VisitPVSecretNames invokes the visitor function with the name of every secret
|
||||
// referenced by the PV spec. If visitor returns false, visiting is short-circuited.
|
||||
// Returns true if visiting completed, false if visiting was short-circuited.
|
||||
func VisitPVSecretNames(pv *api.PersistentVolume, visitor func(string) bool) bool {
|
||||
func VisitPVSecretNames(pv *api.PersistentVolume, visitor func(string, string) bool) bool {
|
||||
source := &pv.Spec.PersistentVolumeSource
|
||||
switch {
|
||||
case source.AzureFile != nil:
|
||||
if len(source.AzureFile.SecretName) > 0 && !visitor(source.AzureFile.SecretName) {
|
||||
if len(source.AzureFile.SecretName) > 0 && !visitor(getClaimRefNamespace(pv), source.AzureFile.SecretName) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
case source.CephFS != nil:
|
||||
if source.CephFS.SecretRef != nil && !visitor(source.CephFS.SecretRef.Name) {
|
||||
if source.CephFS.SecretRef != nil && !visitor(getClaimRefNamespace(pv), source.CephFS.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.FlexVolume != nil:
|
||||
if source.FlexVolume.SecretRef != nil && !visitor(source.FlexVolume.SecretRef.Name) {
|
||||
if source.FlexVolume.SecretRef != nil && !visitor(getClaimRefNamespace(pv), source.FlexVolume.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.RBD != nil:
|
||||
if source.RBD.SecretRef != nil && !visitor(source.RBD.SecretRef.Name) {
|
||||
if source.RBD.SecretRef != nil && !visitor(getClaimRefNamespace(pv), source.RBD.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.ScaleIO != nil:
|
||||
if source.ScaleIO.SecretRef != nil && !visitor(source.ScaleIO.SecretRef.Name) {
|
||||
if source.ScaleIO.SecretRef != nil && !visitor(getClaimRefNamespace(pv), source.ScaleIO.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.ISCSI != nil:
|
||||
if source.ISCSI.SecretRef != nil && !visitor(source.ISCSI.SecretRef.Name) {
|
||||
if source.ISCSI.SecretRef != nil && !visitor(getClaimRefNamespace(pv), source.ISCSI.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.StorageOS != nil:
|
||||
if source.StorageOS.SecretRef != nil && !visitor(source.StorageOS.SecretRef.Namespace, source.StorageOS.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,11 +54,21 @@ func TestPVSecrets(t *testing.T) {
|
||||
ISCSI: &api.ISCSIVolumeSource{
|
||||
SecretRef: &api.LocalObjectReference{
|
||||
Name: "Spec.PersistentVolumeSource.ISCSI.SecretRef"}}}}},
|
||||
{Spec: api.PersistentVolumeSpec{PersistentVolumeSource: api.PersistentVolumeSource{
|
||||
StorageOS: &api.StorageOSPersistentVolumeSource{
|
||||
SecretRef: &api.ObjectReference{
|
||||
Name: "Spec.PersistentVolumeSource.StorageOS.SecretRef",
|
||||
Namespace: "Spec.PersistentVolumeSource.StorageOS.SecretRef"}}}}},
|
||||
}
|
||||
|
||||
extractedNames := sets.NewString()
|
||||
extractedNamespaces := sets.NewString()
|
||||
for _, pv := range pvs {
|
||||
VisitPVSecretNames(pv, func(name string) bool {
|
||||
VisitPVSecretNames(pv, func(namespace, name string) bool {
|
||||
extractedNames.Insert(name)
|
||||
if namespace != "" {
|
||||
extractedNamespaces.Insert(namespace)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
@@ -76,6 +86,7 @@ func TestPVSecrets(t *testing.T) {
|
||||
"Spec.PersistentVolumeSource.RBD.SecretRef",
|
||||
"Spec.PersistentVolumeSource.ScaleIO.SecretRef",
|
||||
"Spec.PersistentVolumeSource.ISCSI.SecretRef",
|
||||
"Spec.PersistentVolumeSource.StorageOS.SecretRef",
|
||||
)
|
||||
secretPaths := collectSecretPaths(t, nil, "", reflect.TypeOf(&api.PersistentVolume{}))
|
||||
secretPaths = secretPaths.Difference(excludedSecretPaths)
|
||||
@@ -96,6 +107,14 @@ func TestPVSecrets(t *testing.T) {
|
||||
t.Logf("Extra secret names:\n%s", strings.Join(extraNames.List(), "\n"))
|
||||
t.Error("Extra secret names extracted. Verify VisitPVSecretNames() is correctly extracting secret names")
|
||||
}
|
||||
|
||||
expectedSecretNamespaces := sets.NewString(
|
||||
"Spec.PersistentVolumeSource.StorageOS.SecretRef",
|
||||
)
|
||||
|
||||
if len(expectedSecretNamespaces.Difference(extractedNamespaces)) > 0 {
|
||||
t.Errorf("Missing expected secret namespace")
|
||||
}
|
||||
}
|
||||
|
||||
// collectSecretPaths traverses the object, computing all the struct paths that lead to fields with "secret" in the name.
|
||||
|
||||
@@ -84,6 +84,10 @@ func VisitPodSecretNames(pod *api.Pod, visitor Visitor) bool {
|
||||
if source.ISCSI.SecretRef != nil && !visitor(source.ISCSI.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.StorageOS != nil:
|
||||
if source.StorageOS.SecretRef != nil && !visitor(source.StorageOS.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -89,7 +89,11 @@ func TestPodSecrets(t *testing.T) {
|
||||
VolumeSource: api.VolumeSource{
|
||||
ISCSI: &api.ISCSIVolumeSource{
|
||||
SecretRef: &api.LocalObjectReference{
|
||||
Name: "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef"}}}}},
|
||||
Name: "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef"}}}}, {
|
||||
VolumeSource: api.VolumeSource{
|
||||
StorageOS: &api.StorageOSVolumeSource{
|
||||
SecretRef: &api.LocalObjectReference{
|
||||
Name: "Spec.Volumes[*].VolumeSource.StorageOS.SecretRef"}}}}},
|
||||
},
|
||||
}
|
||||
extractedNames := sets.NewString()
|
||||
@@ -119,6 +123,7 @@ func TestPodSecrets(t *testing.T) {
|
||||
"Spec.Volumes[*].VolumeSource.Secret.SecretName",
|
||||
"Spec.Volumes[*].VolumeSource.ScaleIO.SecretRef",
|
||||
"Spec.Volumes[*].VolumeSource.ISCSI.SecretRef",
|
||||
"Spec.Volumes[*].VolumeSource.StorageOS.SecretRef",
|
||||
)
|
||||
secretPaths := collectSecretPaths(t, nil, "", reflect.TypeOf(&api.Pod{}))
|
||||
secretPaths = secretPaths.Difference(excludedSecretPaths)
|
||||
|
||||
@@ -313,6 +313,9 @@ type VolumeSource struct {
|
||||
// ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
|
||||
// +optional
|
||||
ScaleIO *ScaleIOVolumeSource
|
||||
// StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
|
||||
// +optional
|
||||
StorageOS *StorageOSVolumeSource
|
||||
}
|
||||
|
||||
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
||||
@@ -384,6 +387,10 @@ type PersistentVolumeSource struct {
|
||||
// Local represents directly-attached storage with node affinity
|
||||
// +optional
|
||||
Local *LocalVolumeSource
|
||||
// StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
|
||||
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
|
||||
// +optional
|
||||
StorageOS *StorageOSPersistentVolumeSource
|
||||
}
|
||||
|
||||
type PersistentVolumeClaimVolumeSource struct {
|
||||
@@ -1149,6 +1156,62 @@ type ScaleIOVolumeSource struct {
|
||||
ReadOnly bool
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
type StorageOSVolumeSource struct {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
VolumeName string
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
VolumeNamespace string
|
||||
// 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.
|
||||
// +optional
|
||||
FSType string
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
ReadOnly bool
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
SecretRef *LocalObjectReference
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
type StorageOSPersistentVolumeSource struct {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
VolumeName string
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
VolumeNamespace string
|
||||
// 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.
|
||||
// +optional
|
||||
FSType string
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
ReadOnly bool
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
SecretRef *ObjectReference
|
||||
}
|
||||
|
||||
// Adapts a ConfigMap into a volume.
|
||||
//
|
||||
// The contents of the target ConfigMap's Data field will be presented in a
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2222,6 +2222,11 @@ message PersistentVolumeSource {
|
||||
// Local represents directly-attached storage with node affinity
|
||||
// +optional
|
||||
optional LocalVolumeSource local = 20;
|
||||
|
||||
// StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
|
||||
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
|
||||
// +optional
|
||||
optional StorageOSPersistentVolumeSource storageos = 21;
|
||||
}
|
||||
|
||||
// PersistentVolumeSpec is the specification of a persistent volume.
|
||||
@@ -3760,6 +3765,70 @@ message ServiceStatus {
|
||||
optional LoadBalancerStatus loadBalancer = 1;
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
message StorageOSPersistentVolumeSource {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
optional string volumeName = 1;
|
||||
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
optional string volumeNamespace = 2;
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
optional string fsType = 3;
|
||||
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
optional bool readOnly = 4;
|
||||
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
optional ObjectReference secretRef = 5;
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
message StorageOSVolumeSource {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
optional string volumeName = 1;
|
||||
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
optional string volumeNamespace = 2;
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
optional string fsType = 3;
|
||||
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
optional bool readOnly = 4;
|
||||
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
optional LocalObjectReference secretRef = 5;
|
||||
}
|
||||
|
||||
// Sysctl defines a kernel parameter to be set
|
||||
message Sysctl {
|
||||
// Name of a property to set
|
||||
@@ -4011,6 +4080,10 @@ message VolumeSource {
|
||||
// ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
|
||||
// +optional
|
||||
optional ScaleIOVolumeSource scaleIO = 25;
|
||||
|
||||
// StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
|
||||
// +optional
|
||||
optional StorageOSVolumeSource storageos = 27;
|
||||
}
|
||||
|
||||
// Represents a vSphere volume resource.
|
||||
|
||||
@@ -174,6 +174,10 @@ func VisitPodSecretNames(pod *v1.Pod, visitor Visitor) bool {
|
||||
if source.ISCSI.SecretRef != nil && !visitor(source.ISCSI.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
case source.StorageOS != nil:
|
||||
if source.StorageOS.SecretRef != nil && !visitor(source.StorageOS.SecretRef.Name) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
@@ -260,7 +260,11 @@ func TestPodSecrets(t *testing.T) {
|
||||
VolumeSource: v1.VolumeSource{
|
||||
ISCSI: &v1.ISCSIVolumeSource{
|
||||
SecretRef: &v1.LocalObjectReference{
|
||||
Name: "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef"}}}}},
|
||||
Name: "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef"}}}}, {
|
||||
VolumeSource: v1.VolumeSource{
|
||||
StorageOS: &v1.StorageOSVolumeSource{
|
||||
SecretRef: &v1.LocalObjectReference{
|
||||
Name: "Spec.Volumes[*].VolumeSource.StorageOS.SecretRef"}}}}},
|
||||
},
|
||||
}
|
||||
extractedNames := sets.NewString()
|
||||
@@ -290,6 +294,7 @@ func TestPodSecrets(t *testing.T) {
|
||||
"Spec.Volumes[*].VolumeSource.Secret.SecretName",
|
||||
"Spec.Volumes[*].VolumeSource.ScaleIO.SecretRef",
|
||||
"Spec.Volumes[*].VolumeSource.ISCSI.SecretRef",
|
||||
"Spec.Volumes[*].VolumeSource.StorageOS.SecretRef",
|
||||
)
|
||||
secretPaths := collectSecretPaths(t, nil, "", reflect.TypeOf(&v1.Pod{}))
|
||||
secretPaths = secretPaths.Difference(excludedSecretPaths)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -348,6 +348,9 @@ type VolumeSource struct {
|
||||
// ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
|
||||
// +optional
|
||||
ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"`
|
||||
// StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
|
||||
// +optional
|
||||
StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"`
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
||||
@@ -442,6 +445,10 @@ type PersistentVolumeSource struct {
|
||||
// Local represents directly-attached storage with node affinity
|
||||
// +optional
|
||||
Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"`
|
||||
// StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
|
||||
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
|
||||
// +optional
|
||||
StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -1228,6 +1235,62 @@ type ScaleIOVolumeSource struct {
|
||||
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"`
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
type StorageOSVolumeSource struct {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
|
||||
// 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.
|
||||
// +optional
|
||||
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
|
||||
}
|
||||
|
||||
// Represents a StorageOS persistent volume resource.
|
||||
type StorageOSPersistentVolumeSource struct {
|
||||
// VolumeName is the human-readable name of the StorageOS volume. Volume
|
||||
// names are only unique within a namespace.
|
||||
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
|
||||
// VolumeNamespace specifies the scope of the volume within StorageOS. If no
|
||||
// namespace is specified then the Pod's namespace will be used. This allows the
|
||||
// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
|
||||
// Set VolumeName to any name to override the default behaviour.
|
||||
// Set to "default" if you are not using namespaces within StorageOS.
|
||||
// Namespaces that do not pre-exist within StorageOS will be created.
|
||||
// +optional
|
||||
VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
|
||||
// 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.
|
||||
// +optional
|
||||
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
|
||||
// Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
// +optional
|
||||
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
|
||||
// SecretRef specifies the secret to use for obtaining the StorageOS API
|
||||
// credentials. If not specified, default values will be attempted.
|
||||
// +optional
|
||||
SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
|
||||
}
|
||||
|
||||
// Adapts a ConfigMap into a volume.
|
||||
//
|
||||
// The contents of the target ConfigMap's Data field will be presented in a
|
||||
|
||||
@@ -1161,6 +1161,7 @@ var map_PersistentVolumeSource = map[string]string{
|
||||
"portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
|
||||
"scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
|
||||
"local": "Local represents directly-attached storage with node affinity",
|
||||
"storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md",
|
||||
}
|
||||
|
||||
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
|
||||
@@ -1875,6 +1876,32 @@ func (ServiceStatus) SwaggerDoc() map[string]string {
|
||||
return map_ServiceStatus
|
||||
}
|
||||
|
||||
var map_StorageOSPersistentVolumeSource = map[string]string{
|
||||
"": "Represents a StorageOS persistent volume resource.",
|
||||
"volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
|
||||
"volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
|
||||
"fsType": "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.",
|
||||
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
|
||||
"secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
|
||||
}
|
||||
|
||||
func (StorageOSPersistentVolumeSource) SwaggerDoc() map[string]string {
|
||||
return map_StorageOSPersistentVolumeSource
|
||||
}
|
||||
|
||||
var map_StorageOSVolumeSource = map[string]string{
|
||||
"": "Represents a StorageOS persistent volume resource.",
|
||||
"volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
|
||||
"volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
|
||||
"fsType": "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.",
|
||||
"readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
|
||||
"secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
|
||||
}
|
||||
|
||||
func (StorageOSVolumeSource) SwaggerDoc() map[string]string {
|
||||
return map_StorageOSVolumeSource
|
||||
}
|
||||
|
||||
var map_Sysctl = map[string]string{
|
||||
"": "Sysctl defines a kernel parameter to be set",
|
||||
"Name": "Name of a property to set",
|
||||
@@ -1980,6 +2007,7 @@ var map_VolumeSource = map[string]string{
|
||||
"projected": "Items for all in one resources secrets, configmaps, and downward API",
|
||||
"portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
|
||||
"scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
|
||||
"storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.",
|
||||
}
|
||||
|
||||
func (VolumeSource) SwaggerDoc() map[string]string {
|
||||
|
||||
@@ -355,6 +355,10 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||
Convert_api_ServiceSpec_To_v1_ServiceSpec,
|
||||
Convert_v1_ServiceStatus_To_api_ServiceStatus,
|
||||
Convert_api_ServiceStatus_To_v1_ServiceStatus,
|
||||
Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource,
|
||||
Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource,
|
||||
Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource,
|
||||
Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource,
|
||||
Convert_v1_Sysctl_To_api_Sysctl,
|
||||
Convert_api_Sysctl_To_v1_Sysctl,
|
||||
Convert_v1_TCPSocketAction_To_api_TCPSocketAction,
|
||||
@@ -3027,6 +3031,7 @@ func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Per
|
||||
out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
|
||||
out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
|
||||
out.Local = (*api.LocalVolumeSource)(unsafe.Pointer(in.Local))
|
||||
out.StorageOS = (*api.StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3056,6 +3061,7 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
||||
out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
|
||||
out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
|
||||
out.Local = (*LocalVolumeSource)(unsafe.Pointer(in.Local))
|
||||
out.StorageOS = (*StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4807,6 +4813,62 @@ func Convert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *S
|
||||
return autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretRef = (*api.ObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretRef = (*ObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource is an autogenerated conversion function.
|
||||
func Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource is an autogenerated conversion function.
|
||||
func Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource is an autogenerated conversion function.
|
||||
func Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
|
||||
return autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error {
|
||||
out.Name = in.Name
|
||||
out.Value = in.Value
|
||||
@@ -5008,6 +5070,7 @@ func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.
|
||||
out.Projected = (*api.ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
|
||||
out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
|
||||
out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
|
||||
out.StorageOS = (*api.StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5043,6 +5106,7 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
|
||||
out.Projected = (*ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
|
||||
out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
|
||||
out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
|
||||
out.StorageOS = (*StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -195,6 +195,8 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Taint, InType: reflect.TypeOf(&Taint{})},
|
||||
@@ -2182,6 +2184,13 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv
|
||||
*out = new(LocalVolumeSource)
|
||||
**out = **in
|
||||
}
|
||||
if in.StorageOS != nil {
|
||||
in, out := &in.StorageOS, &out.StorageOS
|
||||
*out = new(StorageOSPersistentVolumeSource)
|
||||
if err := DeepCopy_v1_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -3436,6 +3445,36 @@ func DeepCopy_v1_ServiceStatus(in interface{}, out interface{}, c *conversion.Cl
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_v1_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
|
||||
func DeepCopy_v1_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*StorageOSPersistentVolumeSource)
|
||||
out := out.(*StorageOSPersistentVolumeSource)
|
||||
*out = *in
|
||||
if in.SecretRef != nil {
|
||||
in, out := &in.SecretRef, &out.SecretRef
|
||||
*out = new(ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_v1_StorageOSVolumeSource is an autogenerated deepcopy function.
|
||||
func DeepCopy_v1_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*StorageOSVolumeSource)
|
||||
out := out.(*StorageOSVolumeSource)
|
||||
*out = *in
|
||||
if in.SecretRef != nil {
|
||||
in, out := &in.SecretRef, &out.SecretRef
|
||||
*out = new(LocalObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_v1_Sysctl is an autogenerated deepcopy function.
|
||||
func DeepCopy_v1_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
@@ -3696,6 +3735,13 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo
|
||||
return err
|
||||
}
|
||||
}
|
||||
if in.StorageOS != nil {
|
||||
in, out := &in.StorageOS, &out.StorageOS
|
||||
*out = new(StorageOSVolumeSource)
|
||||
if err := DeepCopy_v1_StorageOSVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,6 +591,14 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.E
|
||||
allErrs = append(allErrs, validateAzureDisk(source.AzureDisk, fldPath.Child("azureDisk"))...)
|
||||
}
|
||||
}
|
||||
if source.StorageOS != nil {
|
||||
if numVolumes > 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("storageos"), "may not specify more than 1 volume type"))
|
||||
} else {
|
||||
numVolumes++
|
||||
allErrs = append(allErrs, validateStorageOSVolumeSource(source.StorageOS, fldPath.Child("storageos"))...)
|
||||
}
|
||||
}
|
||||
if source.Projected != nil {
|
||||
if numVolumes > 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("projected"), "may not specify more than 1 volume type"))
|
||||
@@ -1116,6 +1124,45 @@ func validateLocalVolumeSource(ls *api.LocalVolumeSource, fldPath *field.Path) f
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func validateStorageOSVolumeSource(storageos *api.StorageOSVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
if len(storageos.VolumeName) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("volumeName"), ""))
|
||||
} else {
|
||||
allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeName, fldPath.Child("volumeName"))...)
|
||||
}
|
||||
if len(storageos.VolumeNamespace) > 0 {
|
||||
allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeNamespace, fldPath.Child("volumeNamespace"))...)
|
||||
}
|
||||
if storageos.SecretRef != nil {
|
||||
if len(storageos.SecretRef.Name) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "name"), ""))
|
||||
}
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func validateStorageOSPersistentVolumeSource(storageos *api.StorageOSPersistentVolumeSource, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
if len(storageos.VolumeName) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("volumeName"), ""))
|
||||
} else {
|
||||
allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeName, fldPath.Child("volumeName"))...)
|
||||
}
|
||||
if len(storageos.VolumeNamespace) > 0 {
|
||||
allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeNamespace, fldPath.Child("volumeNamespace"))...)
|
||||
}
|
||||
if storageos.SecretRef != nil {
|
||||
if len(storageos.SecretRef.Name) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "name"), ""))
|
||||
}
|
||||
if len(storageos.SecretRef.Namespace) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "namespace"), ""))
|
||||
}
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidatePersistentVolumeName checks that a name is appropriate for a
|
||||
// PersistentVolumeName object.
|
||||
var ValidatePersistentVolumeName = NameIsDNSSubdomain
|
||||
@@ -1325,6 +1372,14 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
|
||||
}
|
||||
}
|
||||
}
|
||||
if pv.Spec.StorageOS != nil {
|
||||
if numVolumes > 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(specPath.Child("storageos"), "may not specify more than 1 volume type"))
|
||||
} else {
|
||||
numVolumes++
|
||||
allErrs = append(allErrs, validateStorageOSPersistentVolumeSource(pv.Spec.StorageOS, specPath.Child("storageos"))...)
|
||||
}
|
||||
}
|
||||
|
||||
if numVolumes == 0 {
|
||||
allErrs = append(allErrs, field.Required(specPath, "must specify a volume type"))
|
||||
|
||||
@@ -197,6 +197,8 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Taint, InType: reflect.TypeOf(&Taint{})},
|
||||
@@ -2200,6 +2202,13 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con
|
||||
*out = new(LocalVolumeSource)
|
||||
**out = **in
|
||||
}
|
||||
if in.StorageOS != nil {
|
||||
in, out := &in.StorageOS, &out.StorageOS
|
||||
*out = new(StorageOSPersistentVolumeSource)
|
||||
if err := DeepCopy_api_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -3442,6 +3451,36 @@ func DeepCopy_api_ServiceStatus(in interface{}, out interface{}, c *conversion.C
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_api_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
|
||||
func DeepCopy_api_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*StorageOSPersistentVolumeSource)
|
||||
out := out.(*StorageOSPersistentVolumeSource)
|
||||
*out = *in
|
||||
if in.SecretRef != nil {
|
||||
in, out := &in.SecretRef, &out.SecretRef
|
||||
*out = new(ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_api_StorageOSVolumeSource is an autogenerated deepcopy function.
|
||||
func DeepCopy_api_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*StorageOSVolumeSource)
|
||||
out := out.(*StorageOSVolumeSource)
|
||||
*out = *in
|
||||
if in.SecretRef != nil {
|
||||
in, out := &in.SecretRef, &out.SecretRef
|
||||
*out = new(LocalObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy_api_Sysctl is an autogenerated deepcopy function.
|
||||
func DeepCopy_api_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
@@ -3702,6 +3741,13 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl
|
||||
return err
|
||||
}
|
||||
}
|
||||
if in.StorageOS != nil {
|
||||
in, out := &in.StorageOS, &out.StorageOS
|
||||
*out = new(StorageOSVolumeSource)
|
||||
if err := DeepCopy_api_StorageOSVolumeSource(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user