From 84066fb47f68553f8a03d9346ec5b17e889fe57f Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 24 Mar 2025 11:26:53 +0100 Subject: [PATCH] Make KubeadmConfig FileSystem.Label optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go | 10 ++++++++-- .../bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml | 1 - ...tstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml | 1 - ...rolplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 1 - ....cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml | 1 - 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index ed0b7365a2f9..b52ffdcd5455 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -805,31 +805,37 @@ type Filesystem struct { // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 Device string `json:"device"` + // filesystem specifies the file system type. // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 Filesystem string `json:"filesystem"` + // label specifies the file system label to be used. If set to None, no label is used. - // +required + // +optional // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=512 - Label string `json:"label"` + Label string `json:"label,omitempty"` + // partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number. // +optional // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 Partition *string `json:"partition,omitempty"` + // overwrite defines whether or not to overwrite any existing filesystem. // If true, any pre-existing file system will be destroyed. Use with Caution. // +optional Overwrite *bool `json:"overwrite,omitempty"` + // replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of . // NOTE: unless you define a label, this requires the use of the 'any' partition directive. // +optional // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 ReplaceFS *string `json:"replaceFS,omitempty"` + // extraOpts defined extra options to add to the command for creating the file system. // +optional // +kubebuilder:validation:MaxItems=100 diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml index 51598b7739f4..4c14414f121c 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml @@ -2989,7 +2989,6 @@ spec: required: - device - filesystem - - label type: object maxItems: 100 type: array diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml index 400b6ec24201..4917383f10ba 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml @@ -2964,7 +2964,6 @@ spec: required: - device - filesystem - - label type: object maxItems: 100 type: array diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml index bd85072c3866..7a332a201406 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml @@ -3471,7 +3471,6 @@ spec: required: - device - filesystem - - label type: object maxItems: 100 type: array diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml index 8a69632bba3b..6be0c5a43fe7 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml @@ -2189,7 +2189,6 @@ spec: required: - device - filesystem - - label type: object maxItems: 100 type: array