From a074dd6f2e3ce394b767c109701045d13a56b6e2 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 19 Jun 2024 12:18:33 -0700 Subject: [PATCH] Use +default for now deprecated ScaleIO volume --- api/openapi-spec/v3/api__v1_openapi.json | 4 +++ .../v3/apis__apps__v1_openapi.json | 2 ++ .../v3/apis__batch__v1_openapi.json | 2 ++ .../v3/apis__storage.k8s.io__v1_openapi.json | 2 ++ pkg/apis/apps/v1/zz_generated.defaults.go | 28 ++++++++++++++++--- .../apps/v1beta1/zz_generated.defaults.go | 14 ++++++++-- .../apps/v1beta2/zz_generated.defaults.go | 28 ++++++++++++++++--- pkg/apis/batch/v1/zz_generated.defaults.go | 14 ++++++++-- .../batch/v1beta1/zz_generated.defaults.go | 7 ++++- pkg/apis/core/v1/defaults.go | 18 ------------ pkg/apis/core/v1/zz_generated.defaults.go | 28 ++++++++++++++++--- .../v1beta1/zz_generated.defaults.go | 21 ++++++++++++-- pkg/apis/storage/v1/zz_generated.defaults.go | 7 ++++- .../storage/v1alpha1/zz_generated.defaults.go | 7 ++++- .../storage/v1beta1/zz_generated.defaults.go | 7 ++++- pkg/generated/openapi/zz_generated.openapi.go | 4 +++ .../src/k8s.io/api/core/v1/generated.proto | 4 +++ staging/src/k8s.io/api/core/v1/types.go | 4 +++ .../applyconfigurations/internal/internal.go | 4 +++ 19 files changed, 164 insertions(+), 41 deletions(-) diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index 59ccbbe91c3..361da618c9d 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -6770,6 +6770,7 @@ "description": "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", "properties": { "fsType": { + "default": "xfs", "description": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", "type": "string" }, @@ -6799,6 +6800,7 @@ "type": "boolean" }, "storageMode": { + "default": "ThinProvisioned", "description": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "type": "string" }, @@ -6827,6 +6829,7 @@ "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", "properties": { "fsType": { + "default": "xfs", "description": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", "type": "string" }, @@ -6856,6 +6859,7 @@ "type": "boolean" }, "storageMode": { + "default": "ThinProvisioned", "description": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "type": "string" }, diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index da45584dc67..68b971ac8a7 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -4397,6 +4397,7 @@ "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", "properties": { "fsType": { + "default": "xfs", "description": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", "type": "string" }, @@ -4426,6 +4427,7 @@ "type": "boolean" }, "storageMode": { + "default": "ThinProvisioned", "description": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "type": "string" }, diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 7024dc9df5e..0f8f03cd770 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -3601,6 +3601,7 @@ "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", "properties": { "fsType": { + "default": "xfs", "description": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", "type": "string" }, @@ -3630,6 +3631,7 @@ "type": "boolean" }, "storageMode": { + "default": "ThinProvisioned", "description": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "type": "string" }, diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json index aac7d961b45..d08ac408ec2 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json @@ -1012,6 +1012,7 @@ "description": "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", "properties": { "fsType": { + "default": "xfs", "description": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", "type": "string" }, @@ -1041,6 +1042,7 @@ "type": "boolean" }, "storageMode": { + "default": "ThinProvisioned", "description": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "type": "string" }, diff --git a/pkg/apis/apps/v1/zz_generated.defaults.go b/pkg/apis/apps/v1/zz_generated.defaults.go index 5aabbe228ca..064dc2d883e 100644 --- a/pkg/apis/apps/v1/zz_generated.defaults.go +++ b/pkg/apis/apps/v1/zz_generated.defaults.go @@ -119,7 +119,12 @@ func SetObjectDefaults_DaemonSet(in *v1.DaemonSet) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -419,7 +424,12 @@ func SetObjectDefaults_Deployment(in *v1.Deployment) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -719,7 +729,12 @@ func SetObjectDefaults_ReplicaSet(in *v1.ReplicaSet) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -1019,7 +1034,12 @@ func SetObjectDefaults_StatefulSet(in *v1.StatefulSet) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/apps/v1beta1/zz_generated.defaults.go b/pkg/apis/apps/v1beta1/zz_generated.defaults.go index df1bcb9128d..2d4ad6f2ae6 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/apps/v1beta1/zz_generated.defaults.go @@ -115,7 +115,12 @@ func SetObjectDefaults_Deployment(in *v1beta1.Deployment) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -415,7 +420,12 @@ func SetObjectDefaults_StatefulSet(in *v1beta1.StatefulSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/apps/v1beta2/zz_generated.defaults.go b/pkg/apis/apps/v1beta2/zz_generated.defaults.go index c7dee45332c..4b53bc47d63 100644 --- a/pkg/apis/apps/v1beta2/zz_generated.defaults.go +++ b/pkg/apis/apps/v1beta2/zz_generated.defaults.go @@ -119,7 +119,12 @@ func SetObjectDefaults_DaemonSet(in *v1beta2.DaemonSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -419,7 +424,12 @@ func SetObjectDefaults_Deployment(in *v1beta2.Deployment) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -719,7 +729,12 @@ func SetObjectDefaults_ReplicaSet(in *v1beta2.ReplicaSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -1019,7 +1034,12 @@ func SetObjectDefaults_StatefulSet(in *v1beta2.StatefulSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/batch/v1/zz_generated.defaults.go b/pkg/apis/batch/v1/zz_generated.defaults.go index 362656516b1..86d3b778626 100644 --- a/pkg/apis/batch/v1/zz_generated.defaults.go +++ b/pkg/apis/batch/v1/zz_generated.defaults.go @@ -115,7 +115,12 @@ func SetObjectDefaults_CronJob(in *v1.CronJob) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -415,7 +420,12 @@ func SetObjectDefaults_Job(in *v1.Job) { } } if a.VolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/batch/v1beta1/zz_generated.defaults.go b/pkg/apis/batch/v1beta1/zz_generated.defaults.go index f6d53116b2f..c047716ae63 100644 --- a/pkg/apis/batch/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/batch/v1beta1/zz_generated.defaults.go @@ -113,7 +113,12 @@ func SetObjectDefaults_CronJob(in *v1beta1.CronJob) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/core/v1/defaults.go b/pkg/apis/core/v1/defaults.go index 99c5d18c1cb..68869c71914 100644 --- a/pkg/apis/core/v1/defaults.go +++ b/pkg/apis/core/v1/defaults.go @@ -414,24 +414,6 @@ func defaultHostNetworkPorts(containers *[]v1.Container) { } } -func SetDefaults_ScaleIOVolumeSource(obj *v1.ScaleIOVolumeSource) { - if obj.StorageMode == "" { - obj.StorageMode = "ThinProvisioned" - } - if obj.FSType == "" { - obj.FSType = "xfs" - } -} - -func SetDefaults_ScaleIOPersistentVolumeSource(obj *v1.ScaleIOPersistentVolumeSource) { - if obj.StorageMode == "" { - obj.StorageMode = "ThinProvisioned" - } - if obj.FSType == "" { - obj.FSType = "xfs" - } -} - func SetDefaults_HostPathVolumeSource(obj *v1.HostPathVolumeSource) { typeVol := v1.HostPathUnset if obj.Type == nil { diff --git a/pkg/apis/core/v1/zz_generated.defaults.go b/pkg/apis/core/v1/zz_generated.defaults.go index 9800f9ebd6b..fd65b9517a4 100644 --- a/pkg/apis/core/v1/zz_generated.defaults.go +++ b/pkg/apis/core/v1/zz_generated.defaults.go @@ -171,7 +171,12 @@ func SetObjectDefaults_PersistentVolume(in *v1.PersistentVolume) { } } if in.Spec.PersistentVolumeSource.ScaleIO != nil { - SetDefaults_ScaleIOPersistentVolumeSource(in.Spec.PersistentVolumeSource.ScaleIO) + if in.Spec.PersistentVolumeSource.ScaleIO.StorageMode == "" { + in.Spec.PersistentVolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if in.Spec.PersistentVolumeSource.ScaleIO.FSType == "" { + in.Spec.PersistentVolumeSource.ScaleIO.FSType = "xfs" + } } } @@ -274,7 +279,12 @@ func SetObjectDefaults_Pod(in *v1.Pod) { } } if a.VolumeSource.ScaleIO != nil { - SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -624,7 +634,12 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) { } } if a.VolumeSource.ScaleIO != nil { - SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -925,7 +940,12 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) { } } if a.VolumeSource.ScaleIO != nil { - SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/extensions/v1beta1/zz_generated.defaults.go b/pkg/apis/extensions/v1beta1/zz_generated.defaults.go index b93e15facee..533ab4619a9 100644 --- a/pkg/apis/extensions/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/extensions/v1beta1/zz_generated.defaults.go @@ -121,7 +121,12 @@ func SetObjectDefaults_DaemonSet(in *v1beta1.DaemonSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -421,7 +426,12 @@ func SetObjectDefaults_Deployment(in *v1beta1.Deployment) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { @@ -751,7 +761,12 @@ func SetObjectDefaults_ReplicaSet(in *v1beta1.ReplicaSet) { } } if a.VolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + if a.VolumeSource.ScaleIO.StorageMode == "" { + a.VolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if a.VolumeSource.ScaleIO.FSType == "" { + a.VolumeSource.ScaleIO.FSType = "xfs" + } } if a.VolumeSource.Ephemeral != nil { if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { diff --git a/pkg/apis/storage/v1/zz_generated.defaults.go b/pkg/apis/storage/v1/zz_generated.defaults.go index e8a41b07f33..243aa71314b 100644 --- a/pkg/apis/storage/v1/zz_generated.defaults.go +++ b/pkg/apis/storage/v1/zz_generated.defaults.go @@ -104,7 +104,12 @@ func SetObjectDefaults_VolumeAttachment(in *v1.VolumeAttachment) { } } if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO != nil { - apiscorev1.SetDefaults_ScaleIOPersistentVolumeSource(in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO) + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType = "xfs" + } } } } diff --git a/pkg/apis/storage/v1alpha1/zz_generated.defaults.go b/pkg/apis/storage/v1alpha1/zz_generated.defaults.go index e68725ebd0a..b7460660d39 100644 --- a/pkg/apis/storage/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/storage/v1alpha1/zz_generated.defaults.go @@ -78,7 +78,12 @@ func SetObjectDefaults_VolumeAttachment(in *v1alpha1.VolumeAttachment) { } } if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOPersistentVolumeSource(in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO) + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType = "xfs" + } } } } diff --git a/pkg/apis/storage/v1beta1/zz_generated.defaults.go b/pkg/apis/storage/v1beta1/zz_generated.defaults.go index 42aac234cb1..72f3af70ee7 100644 --- a/pkg/apis/storage/v1beta1/zz_generated.defaults.go +++ b/pkg/apis/storage/v1beta1/zz_generated.defaults.go @@ -104,7 +104,12 @@ func SetObjectDefaults_VolumeAttachment(in *v1beta1.VolumeAttachment) { } } if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO != nil { - corev1.SetDefaults_ScaleIOPersistentVolumeSource(in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO) + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.StorageMode = "ThinProvisioned" + } + if in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType == "" { + in.Spec.Source.InlineVolumeSpec.PersistentVolumeSource.ScaleIO.FSType = "xfs" + } } } } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 368e69bd3dd..ade44638fe6 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -29450,6 +29450,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "storageMode": { SchemaProps: spec.SchemaProps{ Description: "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Default: "ThinProvisioned", Type: []string{"string"}, Format: "", }, @@ -29464,6 +29465,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "fsType": { SchemaProps: spec.SchemaProps{ Description: "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", + Default: "xfs", Type: []string{"string"}, Format: "", }, @@ -29537,6 +29539,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "storageMode": { SchemaProps: spec.SchemaProps{ Description: "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Default: "ThinProvisioned", Type: []string{"string"}, Format: "", }, @@ -29551,6 +29554,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "fsType": { SchemaProps: spec.SchemaProps{ Description: "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", + Default: "xfs", Type: []string{"string"}, Format: "", }, diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index acbc6ad50d6..908a24ef2a0 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -5114,6 +5114,7 @@ message ScaleIOPersistentVolumeSource { // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional + // +default="ThinProvisioned" optional string storageMode = 7; // volumeName is the name of a volume already created in the ScaleIO system @@ -5125,6 +5126,7 @@ message ScaleIOPersistentVolumeSource { // Ex. "ext4", "xfs", "ntfs". // Default is "xfs" // +optional + // +default="xfs" optional string fsType = 9; // readOnly defaults to false (read/write). ReadOnly here will force @@ -5160,6 +5162,7 @@ message ScaleIOVolumeSource { // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional + // +default="ThinProvisioned" optional string storageMode = 7; // volumeName is the name of a volume already created in the ScaleIO system @@ -5171,6 +5174,7 @@ message ScaleIOVolumeSource { // Ex. "ext4", "xfs", "ntfs". // Default is "xfs". // +optional + // +default="xfs" optional string fsType = 9; // readOnly Defaults to false (read/write). ReadOnly here will force diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 8913ffc97aa..691441cb2ab 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -1678,6 +1678,7 @@ type ScaleIOVolumeSource struct { // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional + // +default="ThinProvisioned" StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` // volumeName is the name of a volume already created in the ScaleIO system // that is associated with this volume source. @@ -1687,6 +1688,7 @@ type ScaleIOVolumeSource struct { // Ex. "ext4", "xfs", "ntfs". // Default is "xfs". // +optional + // +default="xfs" FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` // readOnly Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. @@ -1715,6 +1717,7 @@ type ScaleIOPersistentVolumeSource struct { // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional + // +default="ThinProvisioned" StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` // volumeName is the name of a volume already created in the ScaleIO system // that is associated with this volume source. @@ -1724,6 +1727,7 @@ type ScaleIOPersistentVolumeSource struct { // Ex. "ext4", "xfs", "ntfs". // Default is "xfs" // +optional + // +default="xfs" FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` // readOnly defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index b240df02766..9178368616d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -7523,6 +7523,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: fsType type: scalar: string + default: xfs - name: gateway type: scalar: string @@ -7542,6 +7543,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: storageMode type: scalar: string + default: ThinProvisioned - name: storagePool type: scalar: string @@ -7558,6 +7560,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: fsType type: scalar: string + default: xfs - name: gateway type: scalar: string @@ -7577,6 +7580,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: storageMode type: scalar: string + default: ThinProvisioned - name: storagePool type: scalar: string