Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
var tftpPort int
var tftpValidateSource bool
var maxConcurrentReconciles int
var leaderElectionNamespace string
var lockerNamespace string
var lockerDuration time.Duration
var lockerRenewInterval time.Duration
Expand All @@ -95,6 +96,7 @@
flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metrics endpoint binds to. Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
flag.StringVar(&leaderElectionNamespace, "leader-election-namespace", "", "The namespace to use for leader election. If not specified, uses the namespace the manager is deployed in.")
flag.BoolVar(&secureMetrics, "metrics-secure", true, "If set, the metrics endpoint is served securely via HTTPS. Use --metrics-secure=false to use HTTP instead.")
flag.StringVar(&webhookCertPath, "webhook-cert-path", "", "The directory that contains the webhook certificate.")
flag.StringVar(&webhookCertName, "webhook-cert-name", "tls.crt", "The name of the webhook certificate file.")
Expand Down Expand Up @@ -220,7 +222,7 @@
}

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Cache: cache.Options{ReaderFailOnMissingInformer: true, DefaultNamespaces: watchNamespaces},

Check failure on line 225 in cmd/main.go

View workflow job for this annotation

GitHub Actions / Check Go Code

File is not properly formatted (gofmt)
Controller: config.Controller{MaxConcurrentReconciles: maxConcurrentReconciles},
Scheme: scheme,
Metrics: metricsServerOptions,
Expand All @@ -228,6 +230,7 @@
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "e799737f.ironcore.dev",
LeaderElectionNamespace: leaderElectionNamespace,
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
Expand Down
Loading