add v1beta2 condition

pull/6150/head
Ruben 2019-12-22 15:47:16 -05:00
parent 0ce6a0303a
commit 3bedd60e1c
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ func GenerateKubeadmYAML(k8s config.KubernetesConfig, r cruntime.Manager) ([]byt
if version.GTE(semver.MustParse("1.14.0-alpha.0")) {
configTmpl = template.KubeAdmConfigTmplV1Beta1
}
// v1beta2 isn't required until v1.18.
if version.GTE(semver.MustParse("1.18.0-alpha.0")) {
configTmpl = template.KubeAdmConfigTmplV1Beta2
}
if err := configTmpl.Execute(&b, opts); err != nil {
return nil, err
}