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
cmd/catalog: Migrate to using cobra for CLI flag management (#2362)
* cmd/catalog: Migrate to using cobra for CLI flag management
Update the cmd/catalog/main.go and use cobra's CLI library for managing
CLI executables and parsing flags.
Introduce cmd/catalog/start.go which is responsible for returning a
populated command.Command structure that the main function can call and
execute.
Signed-off-by: timflannagan <[email protected]>
* deploy/chart: Use double-hyphen for CLI catalog operator flags
Signed-off-by: timflannagan <[email protected]>
"tls-key", "", "Path to use for private key (requires tls-cert)")
68
-
69
-
tlsCertPath=flag.String(
70
-
"tls-cert", "", "Path to use for certificate key (requires tls-key)")
71
-
72
-
_=flag.Bool("profiling", false, "deprecated")
73
-
74
-
clientCAPath=flag.String("client-ca", "", "path to watch for client ca bundle")
75
-
76
-
installPlanTimeout=flag.Duration("install-plan-retry-timeout", 1*time.Minute, "time since first attempt at which plan execution errors are considered fatal")
77
-
bundleUnpackTimeout=flag.Duration("bundle-unpack-timeout", 10*time.Minute, "The time limit for bundle unpacking, after which InstallPlan execution is considered to have failed. 0 is considered as having no timeout.")
cmd.Flags().StringVar(&o.kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"), "absolute path to the kubeconfig file")
64
+
cmd.Flags().StringVar(&o.catalogNamespace, "namespace", defaultCatalogNamespace, "namespace where catalog will run and install catalog resources")
65
+
cmd.Flags().StringVar(&o.configMapServerImage, "configmapServerImage", defaultConfigMapServerImage, "the image to use for serving the operator registry api for a configmap")
66
+
cmd.Flags().StringVar(&o.opmImage, "opmImage", defaultOPMImage, "the image to use for unpacking bundle content with opm")
cmd.Flags().StringVar(&o.writeStatusName, "writeStatusName", defaultOperatorName, "ClusterOperator name in which to write status, set to \"\" to disable.")
cmd.Flags().DurationVar(&o.bundleUnpackTimeout, "bundle-unpack-timeout", 10*time.Minute, "The time limit for bundle unpacking, after which InstallPlan execution is considered to have failed. 0 is considered as having no timeout.")
81
+
cmd.Flags().DurationVar(&o.installPlanTimeout, "install-plan-retry-timeout", 1*time.Minute, "time since first attempt at which plan execution errors are considered fatal")
0 commit comments