INNER CODE UNIT · Go
parseConfig
aquasecurity/tracee · cmd/tracee-operator/main.go:112
func parseConfig() Config {
var cfg Config
flag.StringVar(&cfg.MetricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&cfg.ProbeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.StringVar(&cfg.TraceeNamespace, "tracee-namespace", "tracee-system", "The namespace where Tracee is installed.")
flag.StringVar(&cfg.TraceeName, "tracee-name", "tracee", "The name of the Tracee DaemonSet.")
flag.StringVar(&cfg.ConfigMapName, "configmap-name", "tracee-config", "The name of the Tracee ConfigMap.")
flag.BoolVar(&cfg.EnableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
cfg.LoggingOpts = zap.Options{
Development: true,
}
cfg.LoggingOpts.BindFlags(flag.CommandLine)
flag.Parse()
if namespace := os.Getenv("TRACEE_NAMESPACE"); namespace != "" {
cfg.TraceeNamespace = namespace