cluster-api: `Machine.Spec.Version` should not be optional
What steps did you take and what happened:
If Machine.Spec.Version is optional, so Machine.Spec.Version may not be configured.
This will result in the following errors:
the logs in kubeadm-bootstrap:
E0722 07:05:46.218660 1 kubeadmconfig_controller.go:481] controller-runtime/manager/controller/kubeadmconfig "msg"="Failed to marshal join configuration" "error"="version cannot be empty" "kind"="Machine" "name"="cmcluster-md-0-75ff4bf755-bcpjc" "namespace"="default" "reconciler group"="bootstrap.cluster.x-k8s.io" "reconciler kind"="KubeadmConfig" "version"="8597463"
E0722 07:05:46.219322 1 controller.go:302] controller-runtime/manager/controller/kubeadmconfig "msg"="Reconciler error" "error"="version cannot be empty" "name"="cmcluster-md-0-pbfmk" "namespace"="default" "reconciler group"="bootstrap.cluster.x-k8s.io" "reconciler kind"="KubeadmConfig"
and the machine status:
NAME PROVIDERID PHASE VERSION
cmcluster-control-plane-pdlvx openstack:///510b45ab-b5e0-4dbc-892b-6f00b59c331c Running v1.19.4
cmcluster-md-0-75ff4bf755-bcpjc Pending
What did you expect to happen:
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
- Cluster-api version:
- Minikube/KIND version:
- Kubernetes version: (use
kubectl version): - OS (e.g. from
/etc/os-release):
/kind bug /area api /area machine
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (16 by maintainers)
According to https://github.com/kubernetes-sigs/cluster-api/pull/5330#issuecomment-929663822 we should preserve the field as optional