Skip to content

Commit

Permalink
allow kcp spec version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sedef committed Mar 9, 2020
1 parent 5f5e57f commit 004ecfa
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -612,6 +612,7 @@ func TestPaths(t *testing.T) {
diff: map[string]interface{}{
"spec": map[string]interface{}{
"replicas": 4,
"version": "1.17.3",
"kubeadmConfigSpec": map[string]interface{}{
"clusterConfiguration": map[string]interface{}{
"version": "v2.0.1",
Expand All @@ -625,6 +626,7 @@ func TestPaths(t *testing.T) {
},
expected: [][]string{
{"spec", "replicas"},
{"spec", "version"},
{"spec", "kubeadmConfigSpec", "joinConfiguration"},
{"spec", "kubeadmConfigSpec", "clusterConfiguration", "version"},
{"spec", "kubeadmConfigSpec", "initConfiguration", "bootstrapToken"},
Expand Down

0 comments on commit 004ecfa

Please sign in to comment.