diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go index 9db8198d29ce..80fc75226ba0 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go @@ -140,6 +140,7 @@ func (in *KubeadmControlPlane) ValidateUpdate(old runtime.Object) (admission.War // For example, {"spec", "*"} will allow any path under "spec" to change. allowedPaths := [][]string{ {"metadata", "*"}, + {spec, kubeadmConfigSpec, "useExperimentalRetryJoin"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageRepository"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageTag"}, {spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "extraArgs"}, diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go index cd230eb618de..3cc75b1122ad 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go @@ -355,6 +355,7 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { Servers: []string{"test-server-1", "test-server-2"}, Enabled: pointer.Bool(true), }, + UseExperimentalRetryJoin: true, }, Version: "v1.16.6", RolloutBefore: &RolloutBefore{ @@ -698,6 +699,9 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { "/invalid-key": "foo", } + updateUseExperimentalRetryJoin := before.DeepCopy() + updateUseExperimentalRetryJoin.Spec.KubeadmConfigSpec.UseExperimentalRetryJoin = false //nolint:staticcheck + tests := []struct { name string enableIgnitionFeature bool @@ -1050,6 +1054,12 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) { before: before, kcp: invalidMetadata, }, + { + name: "should allow changes to useExperimentalRetryJoin", + expectErr: false, + before: before, + kcp: updateUseExperimentalRetryJoin, + }, } for _, tt := range tests {