kubernetes/hack/make-rules
Kubernetes Submit Queue 644a544d62 Merge pull request #46062 from alexandercampbell/correct-deprecation-errors
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
```
2017-05-22 20:58:07 -07:00
..
helpers wire new staging repo 2017-05-02 08:43:31 -04:00
build.sh Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
cross.sh Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
make-help.sh remove hardcoded ansi to tput so that color coding works in multiple platforms including osx. 2017-02-10 10:25:43 -08:00
test-cmd-util.sh Merge pull request #46062 from alexandercampbell/correct-deprecation-errors 2017-05-22 20:58:07 -07:00
test-cmd.sh add --as-group option to cli 2017-05-14 16:21:05 +08:00
test-e2e-node.sh Merge pull request #45707 from Crazykev/cri-experimental 2017-05-19 18:57:34 -07:00
test-federation-cmd.sh Disabling service-dns controller for federation kubectl tests 2017-05-17 10:22:47 +05:30
test-integration.sh add integration tests 2017-05-05 10:50:03 -04:00
test-kubeadm-cmd.sh kubeadm: updated cmd tests as discussed in SIG 2017-02-07 12:47:07 -08:00
test.sh Fix invalid bash script in unit test. 2017-05-15 15:36:27 +08:00
verify.sh hack/cluster: consolidate cluster/ utils to hack/lib/util.sh 2017-03-30 22:34:46 -05:00
vet.sh Disable verify-test-owners.sh and make go vet more obvious 2016-12-21 11:44:04 -08:00