INNER CODE UNIT · Go
main
NVIDIA/gpu-operator · cmd/gpu-operator/main.go:76
func main() {
var metricsAddr string
var enableLeaderElection bool
var leaderElectionNamespace string
var probeAddr string
var renewDeadline time.Duration
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
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-elect-namespace", "",
"Set the leader lease namespace for the controller manager. "+
"If undefined, the leader election namespace defaults to the namespace the operator is running in.")
flag.DurationVar(&renewDeadline, "leader-lease-renew-deadline", 0,
"Set the leader lease renew deadline duration (e.g. \"10s\") of the controller manager. "+
"Only enabled when the --leader-elect flag is set. "+