Added support for kube-context flag, to specify kubernetes context (#1595)

This commit is contained in:
Rahul Bhati
2020-05-11 18:54:06 +05:30
committed by GitHub
parent 3e8cbe112f
commit 2d69542265
8 changed files with 26 additions and 20 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ func App() *cobra.Command {
})
wrapper.SetFlags(rootCmd, flag.FlagSet{
Global: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity},
Global: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity, flag.KubeContext},
})
groups := helptemplate.CommandGroups{}
@@ -86,7 +86,7 @@ func App() *cobra.Command {
flagExposer := helptemplate.ActsAsRootCommand(rootCmd, nil, groups...)
// show global options in usage
flagExposer.ExposeFlags(rootCmd, flagkey.Server, flagkey.Verbosity)
flagExposer.ExposeFlags(rootCmd, flagkey.Server, flagkey.Verbosity, flagkey.KubeContext)
return rootCmd
}