mirror of https://github.com/k3s-io/k3s
Merge pull request #49935 from xiangpengzhao/remove-dep-alias
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438) Remove deprecated kubectl command aliases **What this PR does / why we need it**: These command aliases have been deprecated for more than two years. It's time to remove them. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # ref: #8319 #6118 #8596 **Special notes for your reviewer**: /sig cli **Release note**: ```release-note Remove deprecated kubectl command aliases `apiversions, clusterinfo, resize, rollingupdate, run-container, update` ```pull/6/head
commit
d5ab597eb3
|
@ -21,7 +21,6 @@ docs/man/man1/kube-scheduler.1
|
|||
docs/man/man1/kubectl-alpha.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-edit-last-applied.1
|
||||
docs/man/man1/kubectl-apply-set-last-applied.1
|
||||
docs/man/man1/kubectl-apply-view-last-applied.1
|
||||
|
@ -35,8 +34,6 @@ 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
|
||||
|
@ -91,16 +88,13 @@ 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
|
||||
|
@ -114,7 +108,6 @@ 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
|
||||
|
@ -213,14 +206,12 @@ docs/yaml/kubectl/kubectl.yaml
|
|||
docs/yaml/kubectl/kubectl_alpha.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
|
||||
|
@ -243,16 +234,12 @@ 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
|
||||
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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1,3 +0,0 @@
|
|||
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.
|
|
@ -1234,31 +1234,6 @@ run_kubectl_run_tests() {
|
|||
set +o errexit
|
||||
}
|
||||
|
||||
run_kubectl_using_deprecated_commands_test() {
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
create_and_use_new_namespace
|
||||
kube::log::status "Testing kubectl using deprecated commands"
|
||||
## `kubectl run-container` should function identical to `kubectl run`, but it
|
||||
## should also print a deprecation warning.
|
||||
# Pre-Condition: no Job exists
|
||||
kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||
# Command
|
||||
output_message=$(kubectl 2>&1 run-container pi --generator=job/v1 "--image=$IMAGE_PERL" --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(15)' "${kube_flags[@]}")
|
||||
# Ensure that the user is warned their command is deprecated.
|
||||
kube::test::if_has_string "${output_message}" 'deprecated'
|
||||
# Post-Condition: Job "pi" is created
|
||||
kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" 'pi:'
|
||||
# Clean up
|
||||
kubectl delete jobs pi "${kube_flags[@]}"
|
||||
# Post-condition: no pods exist.
|
||||
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||
|
||||
set +o nounset
|
||||
set +o errexit
|
||||
}
|
||||
|
||||
run_kubectl_get_tests() {
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
@ -4347,7 +4322,6 @@ runTests() {
|
|||
# run for federation apiserver as well.
|
||||
record_command run_kubectl_apply_tests
|
||||
record_command run_kubectl_run_tests
|
||||
record_command run_kubectl_using_deprecated_commands_test
|
||||
record_command run_kubectl_create_filter_tests
|
||||
fi
|
||||
|
||||
|
|
|
@ -285,7 +285,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
|
|||
NewCmdCreate(f, out, err),
|
||||
NewCmdExposeService(f, out),
|
||||
NewCmdRun(f, in, out, err),
|
||||
deprecatedAlias("run-container", NewCmdRun(f, in, out, err)),
|
||||
set.NewCmdSet(f, out, err),
|
||||
},
|
||||
},
|
||||
|
@ -303,9 +302,7 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
|
|||
Commands: []*cobra.Command{
|
||||
rollout.NewCmdRollout(f, out, err),
|
||||
NewCmdRollingUpdate(f, out),
|
||||
deprecatedAlias("rollingupdate", NewCmdRollingUpdate(f, out)),
|
||||
NewCmdScale(f, out),
|
||||
deprecatedAlias("resize", NewCmdScale(f, out)),
|
||||
NewCmdAutoscale(f, out),
|
||||
},
|
||||
},
|
||||
|
@ -314,7 +311,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
|
|||
Commands: []*cobra.Command{
|
||||
NewCmdCertificate(f, out),
|
||||
NewCmdClusterInfo(f, out),
|
||||
deprecatedAlias("clusterinfo", NewCmdClusterInfo(f, out)),
|
||||
NewCmdTop(f, out, err),
|
||||
NewCmdCordon(f, out),
|
||||
NewCmdUncordon(f, out),
|
||||
|
@ -341,7 +337,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
|
|||
NewCmdApply("kubectl", f, out, err),
|
||||
NewCmdPatch(f, out),
|
||||
NewCmdReplace(f, out),
|
||||
deprecatedAlias("update", NewCmdReplace(f, out)),
|
||||
NewCmdConvert(f, out),
|
||||
},
|
||||
},
|
||||
|
@ -383,7 +378,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
|
|||
cmds.AddCommand(NewCmdPlugin(f, in, out, err))
|
||||
cmds.AddCommand(NewCmdVersion(f, out))
|
||||
cmds.AddCommand(NewCmdApiVersions(f, out))
|
||||
cmds.AddCommand(deprecatedAlias("apiversions", NewCmdApiVersions(f, out)))
|
||||
cmds.AddCommand(NewCmdOptions(out))
|
||||
|
||||
return cmds
|
||||
|
|
Loading…
Reference in New Issue