INNER CODE UNIT · Go

addFlags

OT-CONTAINER-KIT/redis-operator · internal/cmd/manager/cmd.go:95

func addFlags(cmd *cobra.Command, opts *managerOptions) {
	cmd.Flags().StringVar(&opts.metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
	cmd.Flags().BoolVar(&opts.secureMetrics, "metrics-secure", false, "If set, the metrics endpoint is served securely over HTTPS with authentication and authorization. Defaults to false (plain HTTP).")
	cmd.Flags().StringVar(&opts.probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
	cmd.Flags().StringVar(&opts.pprofAddr, "pprof-bind-address", "", "The address the pprof endpoint binds to. If empty, pprof is disabled. Example: ':6060'")
	cmd.Flags().BoolVar(&opts.enableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
	cmd.Flags().BoolVar(&opts.enableWebhooks, "enable-webhooks", envs.IsWebhookEnabled(), "Enable webhooks")
	cmd.Flags().IntVar(&opts.maxConcurrentReconciles, "max-concurrent-reconciles", 3, "Maximum number of concurrent reconciles per controller. Reconciles for distinct objects run in parallel (controller-runtime still serializes per object), so a single slow or stuck reconcile cannot starve other Redis resources across namespaces.")
	cmd.Flags().StringVar(&opts.featureGatesString, "feature-gates", envs.GetFeatureGates(), "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
		"Options are:\n  GenerateConfigInInitContainer=true|false: enables using init container for config generation"+
		"\n  AvoidCommandLinePassword=true|false: prevents using -a <password> in redis-cli commands")
	cmd.Flags().Duration(
		operator.KubeClientTimeoutMGRFlag,
		60*time.Second,
		"Timeout for requests made by the Kubernetes API client.",
	)
	cmd.Flags().Float32(
		operator.KubeClientQPSMGRFlag,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…