You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/root.go
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,18 @@ func Execute() {
40
40
}
41
41
}
42
42
43
+
funcaddPersistentFlags(cmd*cobra.Command) {
44
+
cmd.PersistentFlags().String("kubeconfig", "", "Path to the kubeconfig file to use for Kubernetes API requests. If not specified, strimzi-shutdown will try to auto-detect the Kubernetes configuration.")
45
+
cmd.PersistentFlags().String("namespace", "", "Namespace of the Kafka cluster. If not specified, defaults to the namespace from your Kubernetes configuration.")
46
+
cmd.PersistentFlags().String("name", "", "Name of the Kafka cluster")
47
+
cmd.PersistentFlags().Uint32P("timeout", "t", 300000, "Timeout for how long to wait when stopping or continuing the Kafka cluster. In milliseconds.")
48
+
}
49
+
43
50
funcinit() {
44
51
// Here you will define your flags and configuration settings.
45
52
// Cobra supports persistent flags, which, if defined here,
46
53
// will be global for your application.
47
-
rootCmd.PersistentFlags().String("kubeconfig", "", "Path to the kubeconfig file to use for Kubernetes API requests. If not specified, strimzi-shutdown will try to auto-detect the Kubernetes configuration.")
48
-
rootCmd.PersistentFlags().String("namespace", "", "Namespace of the Kafka cluster. If not specified, defaults to the namespace from your Kubernetes configuration.")
49
-
rootCmd.PersistentFlags().String("name", "", "Name of the Kafka cluster")
50
-
rootCmd.PersistentFlags().Uint32P("timeout", "t", 300000, "Timeout for how long to wait when stopping or continuing the Kafka cluster. In milliseconds.")
54
+
addPersistentFlags(rootCmd)
51
55
52
56
// Cobra also supports local flags, which will only run
0 commit comments