-
Notifications
You must be signed in to change notification settings - Fork 39.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubeadm: fix broken kubeadm init --config
flag
#48915
kubeadm: fix broken kubeadm init --config
flag
#48915
Conversation
This code was changed in ea19649 to validate that `--config` wasn't passed along with other flags. Unfortunately, the implementation was checking `PersistentFlags()`, which was not parsed at the point it was being validated. The result was that `--config` was _always_ rejected, not just when it was specified alongside other flags. The fix is to use `Flags()` instead, which contains the expected data.
Hi @mattmoyer. 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 I understand the commands that are listed here. Instructions 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/test-infra repository. I understand the commands that are listed here. |
We need to cherry pick this onto |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: luxas, mattmoyer Associated issue: 345 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@luxas - 1.7.1 is already released. It's too late to modify 1.7.1 ... |
There was some accelerated 1.7.1 release that I wasn't really involved into. |
Oh, hadn't noticed that. Well, ok.
Thanks! |
/retest |
Automatic merge from submit-queue |
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
This code was changed in ea19649 (#43558) to validate that
--config
wasn't passed along with other flags. Unfortunately, the implementation was checkingPersistentFlags()
, which was not parsed at the point it was being validated.The fix is to use
Flags()
instead, which contains the expected data.Which issue this PR fixes fixes kubernetes/kubeadm#345
Special notes for your reviewer:
This is a regression that was cherry picked (#48577) into the
release-1.7
branch. We should fix this before the next 1.7 point release.This is awkward to unit test without restructuring the code. I think this command parsing code would be a good candidate for some higher level tests.
Release note:
/assign @luxas