From d373291a69930725c22d6a46a0c65af412b2030d Mon Sep 17 00:00:00 2001 From: Vivek Koppuru Date: Wed, 12 Jan 2022 19:04:15 -0800 Subject: [PATCH 11/34] Add status.version to list of fields to ignore for update --- .../kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go index 263bda967..1d0d4abfd 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook.go @@ -111,6 +111,7 @@ func (in *KubeadmControlPlane) ValidateCreate() error { const ( spec = "spec" + status = "status" kubeadmConfigSpec = "kubeadmConfigSpec" clusterConfiguration = "clusterConfiguration" initConfiguration = "initConfiguration" @@ -195,6 +196,7 @@ func (in *KubeadmControlPlane) ValidateUpdate(old runtime.Object) error { {spec, "rolloutBefore", "*"}, {spec, "rolloutStrategy"}, {spec, "rolloutStrategy", "*"}, + {status, "version"}, } allErrs := validateKubeadmControlPlaneSpec(in.Spec, in.Namespace, field.NewPath("spec")) -- 2.40.0