File tree Expand file tree Collapse file tree 5 files changed +41
-7
lines changed Expand file tree Collapse file tree 5 files changed +41
-7
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,14 @@ func main() {
87
87
}
88
88
89
89
mgr, err := ctrlrt.NewManager(ctrlrt.GetConfigOrDie(), ctrlrt.Options{
90
- Scheme: scheme,
91
- Port: port,
92
- Host: host,
93
- MetricsBindAddress: ackCfg.MetricsAddr,
94
- LeaderElection: ackCfg.EnableLeaderElection,
95
- LeaderElectionID: awsServiceAPIGroup,
96
- Namespace: ackCfg.WatchNamespace,
90
+ Scheme: scheme,
91
+ Port: port,
92
+ Host: host,
93
+ MetricsBindAddress: ackCfg.MetricsAddr,
94
+ LeaderElection: ackCfg.EnableLeaderElection,
95
+ LeaderElectionID: awsServiceAPIGroup,
96
+ Namespace: ackCfg.WatchNamespace,
97
+ LeaderElectionNamespace: ackCfg.LeaderElectionNamespace,
97
98
} )
98
99
if err != nil {
99
100
setupLog.Error(
Original file line number Diff line number Diff line change 36
36
- "$(ACK_RESOURCE_TAGS)"
37
37
- --watch-namespace
38
38
- "$(ACK_WATCH_NAMESPACE)"
39
+ - --enable-leader-election
40
+ - "$(ENABLE_LEADER_ELECTION)"
41
+ - --leader-election-namespace
42
+ - "$(LEADER_ELECTION_NAMESPACE)"
39
43
image: controller:latest
40
44
name: controller
41
45
ports:
65
69
value: "info"
66
70
- name: ACK_RESOURCE_TAGS
67
71
value: "services.k8s.aws/controller-version=%CONTROLLER_SERVICE%-%CONTROLLER_VERSION%,services.k8s.aws/namespace=%K8S_NAMESPACE%"
72
+ - name: ENABLED_LEADER_ELECTION
73
+ value: "false"
74
+ - name: LEADER_ELECTION_NAMESPACE
75
+ value: ""
68
76
securityContext:
69
77
allowPrivilegeEscalation: false
70
78
privileged: false
Original file line number Diff line number Diff line change 58
58
- " $(ACK_WATCH_NAMESPACE)"
59
59
- --deletion-policy
60
60
- " $(DELETION_POLICY)"
61
+ - --enable-leader-election
62
+ - " $(ENABLE_LEADER_ELECTION)"
63
+ - --leader-election-namespace
64
+ - " $(LEADER_ELECTION_NAMESPACE)"
61
65
{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }}
62
66
- --reconcile-default-resync-seconds
63
67
- " $(RECONCILE_DEFAULT_RESYNC_SECONDS)"
87
91
value : {{ include "watch-namespace" . }}
88
92
- name : DELETION_POLICY
89
93
value : {{ .Values.deletionPolicy }}
94
+ - name : ENABLED_LEADER_ELECTION
95
+ value : {{ .Values.leaderElection.enabled | quote }}
96
+ - name : LEADER_ELECTION_NAMESPACE
97
+ value : {{ .Values.leaderElection.namespace | quote }}
90
98
- name : ACK_ENABLE_DEVELOPMENT_LOGGING
91
99
value : {{ .Values.log.enable_development_logging | quote }}
92
100
- name : ACK_LOG_LEVEL
Original file line number Diff line number Diff line change 231
231
},
232
232
"type" : " object"
233
233
},
234
+ "leaderElection" : {
235
+ "description" : " Parameter to configure the controller's leader election system." ,
236
+ "properties" : {
237
+ "enabled" : {
238
+ "type" : " boolean"
239
+ }
240
+ },
241
+ "type" : " object"
242
+ },
234
243
"serviceAccount" : {
235
244
"description" : " ServiceAccount settings" ,
236
245
"properties" : {
Original file line number Diff line number Diff line change @@ -121,3 +121,11 @@ serviceAccount:
121
121
name: { { .ServiceAccountName } }
122
122
annotations: { }
123
123
# eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME
124
+
125
+ # leader election configurations
126
+ leaderElection:
127
+ # Enables controller leader election
128
+ enabled: false
129
+ # Sets the leader election namespace. By default it will try to use the namespace of
130
+ # the service account mounted to the controller pod.
131
+ namespace: ""
You can’t perform that action at this time.
0 commit comments