bhouse-nexthop opened a new pull request, #14899: URL: https://github.com/apache/cloudstack/pull/14899
### Description Fixes #14897 For clusters with external etcd nodes, CKS writes a kubeadm config file and runs `kubeadm init --config` with it. The file always used `kubeadm.k8s.io/v1beta3`. kubeadm 1.37 refuses `v1beta3`, and kubeadm before 1.31 doesn't know `v1beta4`. | Kubernetes version | Before | After | |---|---|---| | < 1.31 | v1beta3 | v1beta3 | | 1.31 – 1.36 | v1beta3 (deprecated) | v1beta4 | | >= 1.37 | v1beta3, `kubeadm init` fails | v1beta4 | Every field CKS sets (`apiServer.certSANs`, `controlPlaneEndpoint`, `etcd.external.endpoints`, `bootstrapTokens`, `nodeRegistration.criSocket`, `localAPIEndpoint`, `certificateKey`) is the same in both versions. None of the fields whose shape changed in v1beta4, such as `extraArgs`, are used. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [ ] Critical - [x] Major - [ ] Minor - [ ] Trivial ### How Has This Been Tested? - Unit test for the version cutoff (1.30.14, 1.31.0, 1.35.2). - Filled in the kubeadm config from the template with sample values and ran `kubeadm config validate --config` with the release binaries: | kubeadm | v1beta3 file | v1beta4 file | |---|---|---| | 1.30.14 | ok | rejected (unknown version) | | 1.34.2 | ok | ok | | 1.37.3 | rejected (old API spec) | ok | - Not tested yet: a full external etcd CKS deploy. #### How did you try to break this feature and the system with this change? - The other templates (`k8s-node.yml`, `k8s-control-node-add.yml`) and `upgrade-kubernetes.sh` pass kubeadm flags and don't read a config file, so they are not affected. - Existing clusters don't read this file again after the first `kubeadm init`, so upgrades across 1.31 are not affected. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
