Skip to content

Commit d5ae02a

Browse files
authored
Expose concurrent reconcile configuration flags in helm chart values (#517)
This patch adds configuration options for reconciler concurrency tuning (`reconcileDefaultMaxConcurrency` and `reconcileResourceMaxConcurrency`) in the Helm chart values, allowing users to customize reconciliation concurrency for ACK service controllers deployed via Helm charts. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 39cb41c commit d5ae02a

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

templates/config/controller/deployment.yaml.tpl

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ spec:
3939
- --enable-leader-election=$(ENABLE_LEADER_ELECTION)
4040
- --leader-election-namespace
4141
- "$(LEADER_ELECTION_NAMESPACE)"
42+
- --reconcile-default-max-concurrent-syncs
43+
- "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)"
4244
image: controller:latest
4345
name: controller
4446
ports:
@@ -72,6 +74,8 @@ spec:
7274
value: "false"
7375
- name: LEADER_ELECTION_NAMESPACE
7476
value: "ack-system"
77+
- name: "RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS"
78+
value: "1"
7579
securityContext:
7680
allowPrivilegeEscalation: false
7781
privileged: false

templates/helm/templates/deployment.yaml.tpl

+16
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ spec:
7171
{{ "{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}" }}
7272
- --reconcile-resource-resync-seconds
7373
- {{ "\"$(RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }})\"" }}
74+
{{ "{{- end }}" }}
75+
{{ "{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}" }}
76+
- --reconcile-default-max-concurrenct-syncs
77+
- "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)"
78+
{{ "{{- end }}" }}
79+
{{ "{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}" }}
80+
- --reconcile-resource-max-concurrenct-syncs
81+
- {{ "\"$(RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }})\"" }}
7482
{{ "{{- end }}" }}
7583
image: {{ "{{ .Values.image.repository }}:{{ .Values.image.tag }}" }}
7684
imagePullPolicy: {{ "{{ .Values.image.pullPolicy }}" }}
@@ -106,6 +114,14 @@ spec:
106114
{{ "{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}" }}
107115
- name: {{ "RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }}" }}
108116
value: {{ "{{ $key }}={{ $value }}" }}
117+
{{ "{{- end }}" }}
118+
{{ "{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}" }}
119+
- name: RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS
120+
value: {{ "{{ .Values.reconcile.defaultMaxConcurrentSyncs | quote }}" }}
121+
{{ "{{- end }}" }}
122+
{{ "{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}" }}
123+
- name: {{ "RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }}" }}
124+
value: {{ "{{ $key }}={{ $value }}" }}
109125
{{ "{{- end }}" }}
110126
{{ "{{- if .Values.aws.credentials.secretName }}" }}
111127
- name: AWS_SHARED_CREDENTIALS_FILE

templates/helm/values.schema.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,19 @@
223223
"enum": ["delete", "retain"]
224224
},
225225
"reconcile": {
226-
"description": "Reconcile resync settings. Parameters to tune the controller's drift remediation period.",
226+
"description": "Reconcile settings. This is used to configure the controller's reconciliation behavior. e.g resyncPeriod and maxConcurrentSyncs",
227227
"properties": {
228228
"defaultResyncPeriod": {
229229
"type": "number"
230230
},
231231
"resourceResyncPeriods": {
232232
"type": "object"
233+
},
234+
"defaultMaxConcurentSyncs": {
235+
"type": "number"
236+
},
237+
"resourceMaxConcurrentSyncs": {
238+
"type": "object"
233239
}
234240
},
235241
"type": "object"

templates/helm/values.yaml.tpl

+6
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ reconcile:
128128
# An object representing the reconcile resync configuration for each specific resource.
129129
resourceResyncPeriods: {}
130130

131+
# The default number of concurrent syncs that a reconciler can perform.
132+
defaultMaxConcurrentSyncs: 1
133+
# An object representing the reconcile max concurrent syncs configuration for each specific
134+
# resource.
135+
resourceMaxConcurrentSyncs: {}
136+
131137
serviceAccount:
132138
# Specifies whether a service account should be created
133139
create: true

0 commit comments

Comments
 (0)