Fix --extra-config=etcd.* producing invalid kubeadm config#23051
Fix --extra-config=etcd.* producing invalid kubeadm config#23051noamcohen97 wants to merge 2 commits into
--extra-config=etcd.* producing invalid kubeadm config#23051Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: noamcohen97 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
Welcome @noamcohen97! |
|
Hi @noamcohen97. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Can one of the admins verify this patch? |
a81ff70 to
b197243
Compare
|
/kind bug |
|
/ok-to-test |
There was a problem hiding this comment.
Pull request overview
Fixes a kubeadm v1beta4 template rendering bug where etcd.local.dataDir and extraArgs could be emitted on the same line, producing invalid YAML when using --extra-config=etcd.*. The PR also strengthens the kubeadm YAML generation tests to ensure all successful renders are syntactically parseable YAML and adds a dedicated regression case for etcd extra args.
Changes:
- Adjust
ktmpl.V1Beta4to renderetcd.local.extraArgson a new line (fixing the missing linebreak). - Add
assertGeneratedYAMLtest helper to validate generated output parses as YAML (multi-document) before doing golden-file comparisons. - Add
etcd-extra-argsgolden testdata for v1.31–v1.36 and a matching test case so the regression is covered.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta4.go | Fixes whitespace trimming/newline placement so extraArgs no longer attaches to dataDir line. |
| pkg/minikube/bootstrapper/bsutil/kubeadm_test.go | Adds YAML parse validation via a shared helper and introduces an etcd-extra-args test case. |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.31/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.31). |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.32/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.32). |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.33/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.33). |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.34/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.34). |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.35/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.35). |
| pkg/minikube/bootstrapper/bsutil/testdata/v1.36/etcd-extra-args.yaml | Golden output for the new etcd extra args regression case (v1.36). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment has been minimized.
This comment has been minimized.
|
/test pull-minikube-docker-docker-linux-x86 |
|
@noamcohen97: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
kvm2 driver with docker runtime DetailsTimes for minikube (PR 23051) start: 40.8s 39.8s 39.8s 39.4s 40.2s Times for minikube ingress: 19.3s 19.3s 18.8s 19.3s 19.3s docker driver with docker runtime DetailsTimes for minikube ingress: 10.6s 12.7s 12.6s 10.6s 12.7s Times for minikube start: 21.0s 21.7s 22.1s 21.8s 21.2s docker driver with containerd runtime DetailsTimes for minikube start: 18.6s 16.1s 17.0s 16.6s 16.1s Times for minikube ingress: 25.1s 24.6s 24.6s 24.6s 24.6s |
TestGenerateKubeadmYAMLnow verifies that every successful render is parseable YAML, and a newetcd-extra-argscase so the bug is caught by the existing test.The original PR (#22575) addressing this is stale, so opening this as a replacement.
Diff
Fixes #21840