From d2a288de6a4db8cf640bd8f7697f1499b8a2d045 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Wed, 21 Sep 2016 14:14:13 +0200 Subject: [PATCH] Remove kubectl namespace command --- .generated_docs | 3 -- docs/man/man1/kubectl-namespace.1 | 3 -- docs/user-guide/kubectl/kubectl_namespace.md | 41 -------------------- docs/yaml/kubectl/kubectl_namespace.yaml | 3 -- pkg/kubectl/cmd/cmd.go | 1 - pkg/kubectl/cmd/namespace.go | 41 -------------------- 6 files changed, 92 deletions(-) delete mode 100644 docs/man/man1/kubectl-namespace.1 delete mode 100644 docs/user-guide/kubectl/kubectl_namespace.md delete mode 100644 docs/yaml/kubectl/kubectl_namespace.yaml delete mode 100644 pkg/kubectl/cmd/namespace.go diff --git a/.generated_docs b/.generated_docs index b926c676e7..a0f03c91fb 100644 --- a/.generated_docs +++ b/.generated_docs @@ -53,7 +53,6 @@ docs/man/man1/kubectl-expose.1 docs/man/man1/kubectl-get.1 docs/man/man1/kubectl-label.1 docs/man/man1/kubectl-logs.1 -docs/man/man1/kubectl-namespace.1 docs/man/man1/kubectl-options.1 docs/man/man1/kubectl-patch.1 docs/man/man1/kubectl-port-forward.1 @@ -126,7 +125,6 @@ docs/user-guide/kubectl/kubectl_expose.md docs/user-guide/kubectl/kubectl_get.md docs/user-guide/kubectl/kubectl_label.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_patch.md docs/user-guide/kubectl/kubectl_port-forward.md @@ -171,7 +169,6 @@ docs/yaml/kubectl/kubectl_expose.yaml docs/yaml/kubectl/kubectl_get.yaml docs/yaml/kubectl/kubectl_label.yaml docs/yaml/kubectl/kubectl_logs.yaml -docs/yaml/kubectl/kubectl_namespace.yaml docs/yaml/kubectl/kubectl_options.yaml docs/yaml/kubectl/kubectl_patch.yaml docs/yaml/kubectl/kubectl_port-forward.yaml diff --git a/docs/man/man1/kubectl-namespace.1 b/docs/man/man1/kubectl-namespace.1 deleted file mode 100644 index b6fd7a0f98..0000000000 --- a/docs/man/man1/kubectl-namespace.1 +++ /dev/null @@ -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. diff --git a/docs/user-guide/kubectl/kubectl_namespace.md b/docs/user-guide/kubectl/kubectl_namespace.md deleted file mode 100644 index 3d7e48643f..0000000000 --- a/docs/user-guide/kubectl/kubectl_namespace.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -WARNING -WARNING -WARNING -WARNING -WARNING - -

PLEASE NOTE: This document applies to the HEAD of the source tree

- -If you are using a released version of Kubernetes, you should -refer to the docs that go with that version. - - - -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). - --- - - - - - -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. - - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_namespace.md?pixel)]() - diff --git a/docs/yaml/kubectl/kubectl_namespace.yaml b/docs/yaml/kubectl/kubectl_namespace.yaml deleted file mode 100644 index b6fd7a0f98..0000000000 --- a/docs/yaml/kubectl/kubectl_namespace.yaml +++ /dev/null @@ -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. diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 33023f5241..d06839698a 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -315,7 +315,6 @@ Find more information at https://github.com/kubernetes/kubernetes.`, filters := []string{ "options", Deprecated("kubectl", "delete", cmds, NewCmdStop(f, out)), - Deprecated("kubectl", "config set-context", cmds, NewCmdNamespace(out)), } templates.ActsAsRootCommand(cmds, filters, groups...) diff --git a/pkg/kubectl/cmd/namespace.go b/pkg/kubectl/cmd/namespace.go deleted file mode 100644 index bb372f8fdd..0000000000 --- a/pkg/kubectl/cmd/namespace.go +++ /dev/null @@ -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 -}