INNER CODE UNIT · Go
main
aquasecurity/tracee · cmd/tracee-operator/main.go:40
func main() {
config := parseConfig()
// Set up a logger for the controller manager (prefix: "setup").
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&config.LoggingOpts)))
// Create a controller manager that will take care of caching, syncing, and making
// calls to the API server.
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Metrics: metricsserver.Options{BindAddress: config.MetricsAddr},
HealthProbeBindAddress: config.ProbeAddr,
LeaderElection: config.EnableLeaderElection,
LeaderElectionID: "ecaf1259.my.domain",
})
if err != nil {
setupLog.Error(err, "unable to start manager")