diff --git a/templates/config/controller/deployment.yaml.tpl b/templates/config/controller/deployment.yaml.tpl index 777857f9..c3a2654e 100644 --- a/templates/config/controller/deployment.yaml.tpl +++ b/templates/config/controller/deployment.yaml.tpl @@ -39,6 +39,8 @@ spec: - --enable-leader-election=$(ENABLE_LEADER_ELECTION) - --leader-election-namespace - "$(LEADER_ELECTION_NAMESPACE)" + - --reconcile-default-max-concurrent-syncs + - "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)" image: controller:latest name: controller ports: @@ -72,6 +74,8 @@ spec: value: "false" - name: LEADER_ELECTION_NAMESPACE value: "ack-system" + - name: "RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS" + value: "1" securityContext: allowPrivilegeEscalation: false privileged: false diff --git a/templates/helm/templates/deployment.yaml.tpl b/templates/helm/templates/deployment.yaml.tpl index 584091ec..25f16282 100644 --- a/templates/helm/templates/deployment.yaml.tpl +++ b/templates/helm/templates/deployment.yaml.tpl @@ -71,6 +71,14 @@ spec: {{ "{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}" }} - --reconcile-resource-resync-seconds - {{ "\"$(RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }})\"" }} +{{ "{{- end }}" }} +{{ "{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}" }} + - --reconcile-default-max-concurrenct-syncs + - "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)" +{{ "{{- end }}" }} +{{ "{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}" }} + - --reconcile-resource-max-concurrenct-syncs + - {{ "\"$(RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }})\"" }} {{ "{{- end }}" }} image: {{ "{{ .Values.image.repository }}:{{ .Values.image.tag }}" }} imagePullPolicy: {{ "{{ .Values.image.pullPolicy }}" }} @@ -106,6 +114,14 @@ spec: {{ "{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}" }} - name: {{ "RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }}" }} value: {{ "{{ $key }}={{ $value }}" }} +{{ "{{- end }}" }} +{{ "{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}" }} + - name: RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS + value: {{ "{{ .Values.reconcile.defaultMaxConcurrentSyncs | quote }}" }} +{{ "{{- end }}" }} +{{ "{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}" }} + - name: {{ "RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }}" }} + value: {{ "{{ $key }}={{ $value }}" }} {{ "{{- end }}" }} {{ "{{- if .Values.aws.credentials.secretName }}" }} - name: AWS_SHARED_CREDENTIALS_FILE diff --git a/templates/helm/values.schema.json b/templates/helm/values.schema.json index ac28b680..742163eb 100644 --- a/templates/helm/values.schema.json +++ b/templates/helm/values.schema.json @@ -223,13 +223,19 @@ "enum": ["delete", "retain"] }, "reconcile": { - "description": "Reconcile resync settings. Parameters to tune the controller's drift remediation period.", + "description": "Reconcile settings. This is used to configure the controller's reconciliation behavior. e.g resyncPeriod and maxConcurrentSyncs", "properties": { "defaultResyncPeriod": { "type": "number" }, "resourceResyncPeriods": { "type": "object" + }, + "defaultMaxConcurentSyncs": { + "type": "number" + }, + "resourceMaxConcurrentSyncs": { + "type": "object" } }, "type": "object" diff --git a/templates/helm/values.yaml.tpl b/templates/helm/values.yaml.tpl index 07a55eb1..fba632f5 100644 --- a/templates/helm/values.yaml.tpl +++ b/templates/helm/values.yaml.tpl @@ -128,6 +128,12 @@ reconcile: # An object representing the reconcile resync configuration for each specific resource. resourceResyncPeriods: {} + # The default number of concurrent syncs that a reconciler can perform. + defaultMaxConcurrentSyncs: 1 + # An object representing the reconcile max concurrent syncs configuration for each specific + # resource. + resourceMaxConcurrentSyncs: {} + serviceAccount: # Specifies whether a service account should be created create: true