INNER CODE UNIT · Go
prefixedEnv
mariadb-operator/mariadb-operator · cmd/controller/main.go:107
func prefixedEnv(env string) string {
return fmt.Sprintf("%s_%s", envPrefix, env)
}
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(mariadbv1alpha1.AddToScheme(scheme))
utilruntime.Must(monitoringv1.AddToScheme(scheme))
utilruntime.Must(certmanagerv1.AddToScheme(scheme))
utilruntime.Must(volumesnapshotv1.AddToScheme(scheme))
rootCmd.PersistentFlags().StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
rootCmd.PersistentFlags().StringVar(&healthAddr, "health-addr", ":8081", "The address the probe endpoint binds to.")
rootCmd.PersistentFlags().BoolVar(&leaderElect, "leader-elect", false, "Enable leader election for controller manager.")
rootCmd.PersistentFlags().StringVar(&logLevel, logLevelName, "info", "Log level to use, one of: "+
"debug, info, warn, error, dpanic, panic, fatal.")