Skip to content

Commit

Permalink
🐛 Allow KCP spec.version to be mutable
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <vincepri@vmware.com>
  • Loading branch information
vincepri committed Mar 8, 2020
1 parent 4d0192c commit 992f410
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func (in *KubeadmControlPlane) ValidateUpdate(old runtime.Object) error {
{spec, kubeadmConfigSpec, clusterConfiguration, "etcd", "local", "imageTag"},
{spec, "infrastructureTemplate", "name"},
{spec, "replicas"},
{spec, "version"},
}

allErrs := in.validateCommon()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {

validUpdate := before.DeepCopy()
validUpdate.Labels = map[string]string{"blue": "green"}
validUpdate.Spec.Version = "v1.16.6"
validUpdate.Spec.InfrastructureTemplate.Name = "orange"
validUpdate.Spec.Replicas = pointer.Int32Ptr(5)

Expand Down

0 comments on commit 992f410

Please sign in to comment.