![]() Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062) kubectl: fix deprecation warning bug **What this PR does / why we need it**: Some kubectl commands were deprecated but would fail to print the correct warning message when a flag was given before the command name. # Correctly prints the warning that "resize" is deprecated and # "scale" is now preferred. kubectl resize [...] # Should print the same warning but no warning is printed. kubectl --v=1 resize [...] This was due to a fragile check on os.Args[1]. This commit implements a new function deprecatedCmd() that is used to construct new "passthrough" commands which are marked as deprecated and hidden. Note that there is an existing "filters" system that may be preferable to the system created in this commit. I'm not sure why the "filters" array was not used for all deprecated commands in the first place. **Release note**: ```release-note NONE ``` |
||
---|---|---|
.. | ||
helpers | ||
build.sh | ||
cross.sh | ||
make-help.sh | ||
test-cmd-util.sh | ||
test-cmd.sh | ||
test-e2e-node.sh | ||
test-federation-cmd.sh | ||
test-integration.sh | ||
test-kubeadm-cmd.sh | ||
test.sh | ||
verify.sh | ||
vet.sh |