1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Add a --context option

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
This commit is contained in:
Sylvain Rabot
2020-11-02 20:50:14 +01:00
parent 9da7ded976
commit 78d7dca985
126 changed files with 136 additions and 54 deletions

View File

@@ -96,6 +96,7 @@ var rootCmd = &cobra.Command{
var (
kubeconfig string
kubecontext string
namespace string
timeout time.Duration
verbose bool
@@ -108,6 +109,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", defaults.Namespace, "the namespace scope for this operation")
rootCmd.PersistentFlags().DurationVar(&timeout, "timeout", 5*time.Minute, "timeout for this operation")
rootCmd.PersistentFlags().BoolVar(&verbose, "verbose", false, "print generated objects")
rootCmd.PersistentFlags().StringVarP(&kubecontext, "context", "", "", "kubernetes context to use")
}
func main() {