From e837d0deb3256043d7d09b14e15d1b48a0ecaf3c Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Tue, 8 Apr 2025 19:30:44 -0700 Subject: [PATCH] Fix MaxLength of worker topology Name fields Due to existing webhook validation, the max length was effectively 63 characters. This updates the annotation (and CRD) to reflect this actual max length. --- api/v1beta1/cluster_types.go | 4 ++-- config/crd/bases/cluster.x-k8s.io_clusters.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index 14e740ed2c89..de6fba2843e1 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -686,7 +686,7 @@ type MachineDeploymentTopology struct { // the values are hashed together. // +required // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // failureDomain is the failure domain the machines will be created in. @@ -797,7 +797,7 @@ type MachinePoolTopology struct { // the values are hashed together. // +required // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // failureDomains is the list of failure domains the machine pool will be created in. diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index a531234fc356..8eb7748f6be6 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -1511,7 +1511,7 @@ spec: The value is used with other unique identifiers to create a MachineDeployment's Name (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, the values are hashed together. - maxLength: 256 + maxLength: 63 minLength: 1 type: string nodeDeletionTimeout: @@ -1792,7 +1792,7 @@ spec: The value is used with other unique identifiers to create a MachinePool's Name (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, the values are hashed together. - maxLength: 256 + maxLength: 63 minLength: 1 type: string nodeDeletionTimeout: