You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/operator/options/options.go
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -46,20 +46,21 @@ type FeatureGates struct {
46
46
47
47
// Options contains all CLI flags / env vars for karpenter-core. It adheres to the options.Injectable interface.
48
48
typeOptionsstruct {
49
-
ServiceNamestring
50
-
MetricsPortint
51
-
HealthProbePortint
52
-
KubeClientQPSint
53
-
KubeClientBurstint
54
-
EnableProfilingbool
55
-
DisableLeaderElectionbool
56
-
MemoryLimitint64
57
-
LogLevelstring
58
-
LogOutputPathsstring
59
-
LogErrorOutputPathsstring
60
-
BatchMaxDuration time.Duration
61
-
BatchIdleDuration time.Duration
62
-
FeatureGatesFeatureGates
49
+
ServiceNamestring
50
+
MetricsPortint
51
+
HealthProbePortint
52
+
KubeClientQPSint
53
+
KubeClientBurstint
54
+
EnableProfilingbool
55
+
DisableLeaderElectionbool
56
+
LeaderElectionNamespacestring
57
+
MemoryLimitint64
58
+
LogLevelstring
59
+
LogOutputPathsstring
60
+
LogErrorOutputPathsstring
61
+
BatchMaxDuration time.Duration
62
+
BatchIdleDuration time.Duration
63
+
FeatureGatesFeatureGates
63
64
}
64
65
65
66
typeFlagSetstruct {
@@ -87,6 +88,7 @@ func (o *Options) AddFlags(fs *FlagSet) {
87
88
fs.IntVar(&o.KubeClientBurst, "kube-client-burst", env.WithDefaultInt("KUBE_CLIENT_BURST", 300), "The maximum allowed burst of queries to the kube-apiserver")
88
89
fs.BoolVarWithEnv(&o.EnableProfiling, "enable-profiling", "ENABLE_PROFILING", false, "Enable the profiling on the metric endpoint")
89
90
fs.BoolVarWithEnv(&o.DisableLeaderElection, "disable-leader-election", "DISABLE_LEADER_ELECTION", false, "Disable the leader election client before executing the main loop. Disable when running replicated components for high availability is not desired.")
91
+
fs.StringVar(&o.LeaderElectionNamespace, "leader-election-namespace", env.WithDefaultString("LEADER_ELECTION_NAMESPACE", ""), "Leader election namespace to create and monitor the lease if running outside the cluster")
90
92
fs.Int64Var(&o.MemoryLimit, "memory-limit", env.WithDefaultInt64("MEMORY_LIMIT", -1), "Memory limit on the container running the controller. The GC soft memory limit is set to 90% of this value.")
91
93
fs.StringVar(&o.LogLevel, "log-level", env.WithDefaultString("LOG_LEVEL", "info"), "Log verbosity level. Can be one of 'debug', 'info', or 'error'")
0 commit comments