INNER CODE UNIT · Go
init
mariadb-operator/mariadb-operator · cmd/agent/main.go:48
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(mariadbv1alpha1.AddToScheme(scheme))
RootCmd.PersistentFlags().StringVar(&addr, "addr", ":5555", "The address that the HTTP(s) API server binds to")
RootCmd.PersistentFlags().StringVar(&probeAddr, "probe-addr", ":5566", "The address that the HTTP probe server binds to")
RootCmd.PersistentFlags().StringVar(&configDir, "config-dir", "/etc/mysql/mariadb.conf.d",
"The directory that contains MariaDB configuration files")
RootCmd.PersistentFlags().StringVar(&stateDir, "state-dir", "/var/lib/mysql", "The directory that contains MariaDB state files")
RootCmd.PersistentFlags().IntVar(&compressLevel, "compress-level", 5, "HTTP compression level")
RootCmd.PersistentFlags().IntVar(&rateLimitRequests, "rate-limit-requests", 0, "Number of requests to be used as rate limit")
RootCmd.PersistentFlags().DurationVar(&rateLimitDuration, "rate-limit-duration", 0, "Duration to be used as rate limit")
RootCmd.PersistentFlags().DurationVar(&gracefulShutdownTimeout, "graceful-shutdown-timeout", 5*time.Second,
"Timeout to gracefully terminate in-flight requests")
RootCmd.PersistentFlags().BoolVar(&kubernetesAuth, "kubernetes-auth", false, "Enable Kubernetes authentication via the TokenReview API")