mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
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 ```
This commit is contained in:
@@ -12,6 +12,7 @@ docs/man/man1/kube-proxy.1
|
||||
docs/man/man1/kube-scheduler.1
|
||||
docs/man/man1/kubectl-annotate.1
|
||||
docs/man/man1/kubectl-api-versions.1
|
||||
docs/man/man1/kubectl-apiversions.1
|
||||
docs/man/man1/kubectl-apply-set-last-applied.1
|
||||
docs/man/man1/kubectl-apply-view-last-applied.1
|
||||
docs/man/man1/kubectl-apply.1
|
||||
@@ -24,6 +25,8 @@ docs/man/man1/kubectl-certificate-deny.1
|
||||
docs/man/man1/kubectl-certificate.1
|
||||
docs/man/man1/kubectl-cluster-info-dump.1
|
||||
docs/man/man1/kubectl-cluster-info.1
|
||||
docs/man/man1/kubectl-clusterinfo-dump.1
|
||||
docs/man/man1/kubectl-clusterinfo.1
|
||||
docs/man/man1/kubectl-completion.1
|
||||
docs/man/man1/kubectl-config-current-context.1
|
||||
docs/man/man1/kubectl-config-delete-cluster.1
|
||||
@@ -77,13 +80,16 @@ docs/man/man1/kubectl-plugin.1
|
||||
docs/man/man1/kubectl-port-forward.1
|
||||
docs/man/man1/kubectl-proxy.1
|
||||
docs/man/man1/kubectl-replace.1
|
||||
docs/man/man1/kubectl-resize.1
|
||||
docs/man/man1/kubectl-rolling-update.1
|
||||
docs/man/man1/kubectl-rollingupdate.1
|
||||
docs/man/man1/kubectl-rollout-history.1
|
||||
docs/man/man1/kubectl-rollout-pause.1
|
||||
docs/man/man1/kubectl-rollout-resume.1
|
||||
docs/man/man1/kubectl-rollout-status.1
|
||||
docs/man/man1/kubectl-rollout-undo.1
|
||||
docs/man/man1/kubectl-rollout.1
|
||||
docs/man/man1/kubectl-run-container.1
|
||||
docs/man/man1/kubectl-run.1
|
||||
docs/man/man1/kubectl-scale.1
|
||||
docs/man/man1/kubectl-set-image.1
|
||||
@@ -97,6 +103,7 @@ docs/man/man1/kubectl-top-node.1
|
||||
docs/man/man1/kubectl-top-pod.1
|
||||
docs/man/man1/kubectl-top.1
|
||||
docs/man/man1/kubectl-uncordon.1
|
||||
docs/man/man1/kubectl-update.1
|
||||
docs/man/man1/kubectl-version.1
|
||||
docs/man/man1/kubectl.1
|
||||
docs/man/man1/kubelet.1
|
||||
@@ -191,12 +198,14 @@ docs/user-guide/kubectl/kubectl_version.md
|
||||
docs/yaml/kubectl/kubectl.yaml
|
||||
docs/yaml/kubectl/kubectl_annotate.yaml
|
||||
docs/yaml/kubectl/kubectl_api-versions.yaml
|
||||
docs/yaml/kubectl/kubectl_apiversions.yaml
|
||||
docs/yaml/kubectl/kubectl_apply.yaml
|
||||
docs/yaml/kubectl/kubectl_attach.yaml
|
||||
docs/yaml/kubectl/kubectl_auth.yaml
|
||||
docs/yaml/kubectl/kubectl_autoscale.yaml
|
||||
docs/yaml/kubectl/kubectl_certificate.yaml
|
||||
docs/yaml/kubectl/kubectl_cluster-info.yaml
|
||||
docs/yaml/kubectl/kubectl_clusterinfo.yaml
|
||||
docs/yaml/kubectl/kubectl_completion.yaml
|
||||
docs/yaml/kubectl/kubectl_config.yaml
|
||||
docs/yaml/kubectl/kubectl_convert.yaml
|
||||
@@ -219,8 +228,11 @@ docs/yaml/kubectl/kubectl_plugin.yaml
|
||||
docs/yaml/kubectl/kubectl_port-forward.yaml
|
||||
docs/yaml/kubectl/kubectl_proxy.yaml
|
||||
docs/yaml/kubectl/kubectl_replace.yaml
|
||||
docs/yaml/kubectl/kubectl_resize.yaml
|
||||
docs/yaml/kubectl/kubectl_rolling-update.yaml
|
||||
docs/yaml/kubectl/kubectl_rollingupdate.yaml
|
||||
docs/yaml/kubectl/kubectl_rollout.yaml
|
||||
docs/yaml/kubectl/kubectl_run-container.yaml
|
||||
docs/yaml/kubectl/kubectl_run.yaml
|
||||
docs/yaml/kubectl/kubectl_scale.yaml
|
||||
docs/yaml/kubectl/kubectl_set.yaml
|
||||
@@ -228,4 +240,5 @@ docs/yaml/kubectl/kubectl_stop.yaml
|
||||
docs/yaml/kubectl/kubectl_taint.yaml
|
||||
docs/yaml/kubectl/kubectl_top.yaml
|
||||
docs/yaml/kubectl/kubectl_uncordon.yaml
|
||||
docs/yaml/kubectl/kubectl_update.yaml
|
||||
docs/yaml/kubectl/kubectl_version.yaml
|
||||
|
||||
3
docs/man/man1/kubectl-apiversions.1
Normal file
3
docs/man/man1/kubectl-apiversions.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-clusterinfo-dump.1
Normal file
3
docs/man/man1/kubectl-clusterinfo-dump.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-clusterinfo.1
Normal file
3
docs/man/man1/kubectl-clusterinfo.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-resize.1
Normal file
3
docs/man/man1/kubectl-resize.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-rollingupdate.1
Normal file
3
docs/man/man1/kubectl-rollingupdate.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-run-container.1
Normal file
3
docs/man/man1/kubectl-run-container.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/man/man1/kubectl-update.1
Normal file
3
docs/man/man1/kubectl-update.1
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_apiversions.yaml
Normal file
3
docs/yaml/kubectl/kubectl_apiversions.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_clusterinfo.yaml
Normal file
3
docs/yaml/kubectl/kubectl_clusterinfo.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_resize.yaml
Normal file
3
docs/yaml/kubectl/kubectl_resize.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_rollingupdate.yaml
Normal file
3
docs/yaml/kubectl/kubectl_rollingupdate.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_run-container.yaml
Normal file
3
docs/yaml/kubectl/kubectl_run-container.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
3
docs/yaml/kubectl/kubectl_update.yaml
Normal file
3
docs/yaml/kubectl/kubectl_update.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
This file is autogenerated, but we've stopped checking such files into the
|
||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
|
||||
populate this file.
|
||||
Reference in New Issue
Block a user