-
Kubernetes Submit Queue authored
Automatic merge from submit-queue kubeadm: fix broken `kubeadm init --config` flag **What this PR does / why we need it**: This code was changed in ea196490 (https://github.com/kubernetes/kubernetes/pull/43558) 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 fix is to use `Flags()` instead, which contains the expected data. **Which issue this PR fixes** fixes https://github.com/kubernetes/kubeadm/issues/345 **Special notes for your reviewer**: This is a regression that was cherry picked (https://github.com/kubernetes/kubernetes/pull/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**: ```release-note Fix a regression that broke the `--config` flag for `kubeadm init`. ``` /assign @luxas
b664aebb