use ParseTolerant

pull/14848/head
Steven Powell 2022-08-29 16:46:19 -07:00
parent 89d3ddd6df
commit 9941ab1f21
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ func (c Calico) String() string {
// manifest returns a Kubernetes manifest for a CNI
func (c Calico) manifest() (assets.CopyableFile, error) {
k8sVersion, err := semver.Parse(c.cc.KubernetesConfig.KubernetesVersion)
k8sVersion, err := semver.ParseTolerant(c.cc.KubernetesConfig.KubernetesVersion)
if err != nil {
return nil, fmt.Errorf("failed to parse Kubernetes version: %v", err)
}

View File

@ -680,7 +680,7 @@ func (c Flannel) Apply(r Runner) error {
}
}
k8sVersion, err := semver.Parse(c.cc.KubernetesConfig.KubernetesVersion)
k8sVersion, err := semver.ParseTolerant(c.cc.KubernetesConfig.KubernetesVersion)
if err != nil {
return fmt.Errorf("failed to parse Kubernetes version: %v", err)
}