Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Renames the svcat --kube-context flag to --context (#1821) #1997

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/svcat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func buildRootCommand(cxt *command.Context) *cobra.Command {
},
}

cmd.PersistentFlags().StringVar(&opts.KubeContext, "kube-context", "", "name of the kube context to use")
cmd.PersistentFlags().StringVar(&opts.KubeContext, "context", "", "name of the kubeconfig context to use.")
cmd.PersistentFlags().StringVar(&opts.KubeConfig, "kubeconfig", "", "path to kubeconfig file. Overrides $KUBECONFIG")

cmd.AddCommand(newGetCmd(cxt))
Expand Down
1 change: 0 additions & 1 deletion cmd/svcat/plugin/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ var reservedFlags = map[string]struct{}{
"help": {},
"insecure-skip-tls-verify": {},
"kubeconfig": {},
"kube-context": {},
"log-backtrace-at": {},
"log-dir": {},
"log-flush-frequency": {},
Expand Down
50 changes: 25 additions & 25 deletions cmd/svcat/testdata/output/completion-bash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ _svcat_bind()
local_nonpersistent_flags+=("--secret=")
flags+=("--secret-name=")
local_nonpersistent_flags+=("--secret-name=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -271,7 +271,7 @@ _svcat_completion()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -297,7 +297,7 @@ _svcat_deprovision()
flags+=("--namespace=")
two_word_flags+=("-n")
local_nonpersistent_flags+=("--namespace=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -327,7 +327,7 @@ _svcat_describe_binding()
flags+=("--traverse")
flags+=("-t")
local_nonpersistent_flags+=("--traverse")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -349,7 +349,7 @@ _svcat_describe_broker()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -377,7 +377,7 @@ _svcat_describe_class()
flags+=("--uuid")
flags+=("-u")
local_nonpersistent_flags+=("--uuid")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -405,7 +405,7 @@ _svcat_describe_instance()
flags+=("--traverse")
flags+=("-t")
local_nonpersistent_flags+=("--traverse")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -435,7 +435,7 @@ _svcat_describe_plan()
flags+=("--uuid")
flags+=("-u")
local_nonpersistent_flags+=("--uuid")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -462,7 +462,7 @@ _svcat_describe()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -492,7 +492,7 @@ _svcat_get_bindings()
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -517,7 +517,7 @@ _svcat_get_brokers()
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -545,7 +545,7 @@ _svcat_get_classes()
flags+=("--uuid")
flags+=("-u")
local_nonpersistent_flags+=("--uuid")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -575,7 +575,7 @@ _svcat_get_instances()
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -606,7 +606,7 @@ _svcat_get_plans()
flags+=("--uuid")
flags+=("-u")
local_nonpersistent_flags+=("--uuid")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -633,7 +633,7 @@ _svcat_get()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -658,7 +658,7 @@ _svcat_install_plugin()
flags+=("--plugins-path=")
two_word_flags+=("-p")
local_nonpersistent_flags+=("--plugins-path=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -681,7 +681,7 @@ _svcat_install()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -718,7 +718,7 @@ _svcat_provision()
flags+=("--secret=")
two_word_flags+=("-s")
local_nonpersistent_flags+=("--secret=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -742,7 +742,7 @@ _svcat_sync_broker()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -765,7 +765,7 @@ _svcat_sync()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -790,7 +790,7 @@ _svcat_touch_instance()
flags+=("--namespace=")
two_word_flags+=("-n")
local_nonpersistent_flags+=("--namespace=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -813,7 +813,7 @@ _svcat_touch()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -840,7 +840,7 @@ _svcat_unbind()
flags+=("--namespace=")
two_word_flags+=("-n")
local_nonpersistent_flags+=("--namespace=")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand All @@ -865,7 +865,7 @@ _svcat_version()
flags+=("--client")
flags+=("-c")
local_nonpersistent_flags+=("--client")
flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down Expand Up @@ -898,7 +898,7 @@ _svcat()
flags_with_completion=()
flags_completion=()

flags+=("--kube-context=")
flags+=("--context=")
flags+=("--kubeconfig=")
flags+=("--logtostderr")
flags+=("--v=")
Expand Down