mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #33275 from maciaszczykm/remove-kubectl-namespace-cmd
Automatic merge from submit-queue Remove kubectl namespace command **What this PR does / why we need it**: It removes deprecated `kubectl namespace` command, which `has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set-context --help' for more details`. It was done nearly two years ago, so like `// TODO remove once people have been given enough time to notice` comment says it may be a good time to get rid of it. **Special notes for your reviewer**: None ATM. **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note Remove kubectl namespace command ```
This commit is contained in:
commit
beba1e2c8f
@ -57,7 +57,6 @@ docs/man/man1/kubectl-expose.1
|
|||||||
docs/man/man1/kubectl-get.1
|
docs/man/man1/kubectl-get.1
|
||||||
docs/man/man1/kubectl-label.1
|
docs/man/man1/kubectl-label.1
|
||||||
docs/man/man1/kubectl-logs.1
|
docs/man/man1/kubectl-logs.1
|
||||||
docs/man/man1/kubectl-namespace.1
|
|
||||||
docs/man/man1/kubectl-options.1
|
docs/man/man1/kubectl-options.1
|
||||||
docs/man/man1/kubectl-patch.1
|
docs/man/man1/kubectl-patch.1
|
||||||
docs/man/man1/kubectl-port-forward.1
|
docs/man/man1/kubectl-port-forward.1
|
||||||
@ -131,7 +130,6 @@ docs/user-guide/kubectl/kubectl_expose.md
|
|||||||
docs/user-guide/kubectl/kubectl_get.md
|
docs/user-guide/kubectl/kubectl_get.md
|
||||||
docs/user-guide/kubectl/kubectl_label.md
|
docs/user-guide/kubectl/kubectl_label.md
|
||||||
docs/user-guide/kubectl/kubectl_logs.md
|
docs/user-guide/kubectl/kubectl_logs.md
|
||||||
docs/user-guide/kubectl/kubectl_namespace.md
|
|
||||||
docs/user-guide/kubectl/kubectl_options.md
|
docs/user-guide/kubectl/kubectl_options.md
|
||||||
docs/user-guide/kubectl/kubectl_patch.md
|
docs/user-guide/kubectl/kubectl_patch.md
|
||||||
docs/user-guide/kubectl/kubectl_port-forward.md
|
docs/user-guide/kubectl/kubectl_port-forward.md
|
||||||
@ -176,7 +174,6 @@ docs/yaml/kubectl/kubectl_expose.yaml
|
|||||||
docs/yaml/kubectl/kubectl_get.yaml
|
docs/yaml/kubectl/kubectl_get.yaml
|
||||||
docs/yaml/kubectl/kubectl_label.yaml
|
docs/yaml/kubectl/kubectl_label.yaml
|
||||||
docs/yaml/kubectl/kubectl_logs.yaml
|
docs/yaml/kubectl/kubectl_logs.yaml
|
||||||
docs/yaml/kubectl/kubectl_namespace.yaml
|
|
||||||
docs/yaml/kubectl/kubectl_options.yaml
|
docs/yaml/kubectl/kubectl_options.yaml
|
||||||
docs/yaml/kubectl/kubectl_patch.yaml
|
docs/yaml/kubectl/kubectl_patch.yaml
|
||||||
docs/yaml/kubectl/kubectl_port-forward.yaml
|
docs/yaml/kubectl/kubectl_port-forward.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,41 +0,0 @@
|
|||||||
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
|
|
||||||
|
|
||||||
<!-- BEGIN STRIP_FOR_RELEASE -->
|
|
||||||
|
|
||||||
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
|
|
||||||
width="25" height="25">
|
|
||||||
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
|
|
||||||
width="25" height="25">
|
|
||||||
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
|
|
||||||
width="25" height="25">
|
|
||||||
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
|
|
||||||
width="25" height="25">
|
|
||||||
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
|
|
||||||
width="25" height="25">
|
|
||||||
|
|
||||||
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
|
|
||||||
|
|
||||||
If you are using a released version of Kubernetes, you should
|
|
||||||
refer to the docs that go with that version.
|
|
||||||
|
|
||||||
<!-- TAG RELEASE_LINK, added by the munger automatically -->
|
|
||||||
<strong>
|
|
||||||
The latest release of this document can be found
|
|
||||||
[here](http://releases.k8s.io/release-1.4/docs/user-guide/kubectl/kubectl_namespace.md).
|
|
||||||
|
|
||||||
Documentation for other releases can be found at
|
|
||||||
[releases.k8s.io](http://releases.k8s.io).
|
|
||||||
</strong>
|
|
||||||
--
|
|
||||||
|
|
||||||
<!-- END STRIP_FOR_RELEASE -->
|
|
||||||
|
|
||||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
|
||||||
[]()
|
|
||||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
|
@ -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.
|
|
@ -315,7 +315,6 @@ Find more information at https://github.com/kubernetes/kubernetes.`,
|
|||||||
filters := []string{
|
filters := []string{
|
||||||
"options",
|
"options",
|
||||||
Deprecated("kubectl", "delete", cmds, NewCmdStop(f, out)),
|
Deprecated("kubectl", "delete", cmds, NewCmdStop(f, out)),
|
||||||
Deprecated("kubectl", "config set-context", cmds, NewCmdNamespace(out)),
|
|
||||||
}
|
}
|
||||||
templates.ActsAsRootCommand(cmds, filters, groups...)
|
templates.ActsAsRootCommand(cmds, filters, groups...)
|
||||||
|
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2014 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TODO remove once people have been given enough time to notice
|
|
||||||
func NewCmdNamespace(out io.Writer) *cobra.Command {
|
|
||||||
cmd := &cobra.Command{
|
|
||||||
Use: "namespace [namespace]",
|
|
||||||
Short: "SUPERSEDED: Set and view the current Kubernetes namespace",
|
|
||||||
Long: `SUPERSEDED: Set and view the current Kubernetes namespace scope for command line requests.
|
|
||||||
|
|
||||||
namespace has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set-context --help' for more details.
|
|
||||||
`,
|
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
util.CheckErr(fmt.Errorf("namespace has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set-context --help' for more details."))
|
|
||||||
},
|
|
||||||
}
|
|
||||||
return cmd
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user