cluster-api: KCP/CABPK should reject known invalid Kubernetes versions
What steps did you take and what happened:
- Try to create a cluster with KCP.spec.kubernetesVersion set to something like
v1.19.1_mycompany.2 - kubeadm bootstrapping fails with this in the output
couldn't parse Kubernetes version "v1.19.1_mycompany.2": could not parse pre-release/metadata (_mycompany.2) in version "v1.19.1_mycompany.2"
What did you expect to happen:
- kubeadm bootstrapping succeeds
Anything else you would like to add:
For this example, a valid/appropriate version would be v1.19.1+mycompany.2.
kubeadm only accepts valid semver values. We should consider adding webhook validations for both KCP and KubeadmConfig.
Environment:
- Cluster-api version: v0.3.x
/kind bug /area control-plane /area bootstrap
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (25 by maintainers)
Let me take a look tomorrow and try to get a picture of all the points where we are doing version validation before making an action plan
We can probably use this issue to align all our validations on Kubernetes versions, and use the exact same code / parsing everywhere
/milestone v0.4.0