config: allow k8s version MAJOR.MINOR for v2.6 (#1222)

To adhere to our compatibility goal of not breaking
old configs, the kubernetes patch version is automatically
extended for configs in the transistional version v2.6.
This commit is contained in:
Otto Bittner 2023-02-20 10:50:55 +01:00 committed by GitHub
parent b6b353c53e
commit c0a62a52d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 4 deletions

View file

@ -273,6 +273,26 @@ func TestValidate(t *testing.T) {
return cnf
}(),
},
// TODO: v2.7: remove this test as it should start breaking after v2.6 is released.
"k8s vMAJOR.MINOR is valid in v2.7": {
cnf: func() *Config {
cnf := Default()
cnf.KubernetesVersion = "v1.25"
return cnf
}(),
wantErr: true,
wantErrCount: defaultErrCount,
},
// TODO: v2.7: remove this test as it should start breaking after v2.6 is released.
"k8s MAJOR.MINOR is valid in v2.7": {
cnf: func() *Config {
cnf := Default()
cnf.KubernetesVersion = "1.25"
return cnf
}(),
wantErr: true,
wantErrCount: defaultErrCount,
},
}
for name, tc := range testCases {