Set per-controller reconcile concurrency defaults and remove --default-max-concurrent-reconciles (#4670)

This commit is contained in:
Nikola Jokic
2026-09-21 11:32:52 +02:00
committed by GitHub
parent c2104a0b72
commit 68e4cfeea5
9 changed files with 166 additions and 113 deletions
@@ -47,9 +47,6 @@ args:
{{- with .Values.controller.manager.config.watchSingleNamespace }}
- "--watch-single-namespace={{ . }}"
{{- end }}
{{- with .Values.controller.manager.config.defaultMaxConcurrentReconciles }}
- "--default-max-concurrent-reconciles={{ . }}"
{{- end }}
{{- with .Values.controller.manager.config.autoscalingRunnerSetMaxConcurrentReconciles }}
- "--autoscaling-runner-set-max-concurrent-reconciles={{ . }}"
{{- end }}
@@ -74,33 +74,31 @@ tests:
path: spec.template.spec.containers[0].args
content: "--listener-metrics-endpoint=/metrics"
- it: should omit every max-concurrent-reconciles flag by default
- it: should render every max-concurrent-reconciles flag by default
release:
name: "test-arc"
namespace: "test-ns"
asserts:
- notContains:
# An exact match, so this pins both the values and the render order.
- equal:
path: spec.template.spec.containers[0].args
content: "--ephemeral-runner-max-concurrent-reconciles=1"
- notContains:
path: spec.template.spec.containers[0].args
content: "--default-max-concurrent-reconciles=1"
- notContains:
path: spec.template.spec.containers[0].args
content: "--autoscaling-runner-set-max-concurrent-reconciles=1"
- notContains:
path: spec.template.spec.containers[0].args
content: "--autoscaling-listener-max-concurrent-reconciles=1"
- notContains:
path: spec.template.spec.containers[0].args
content: "--ephemeral-runner-set-max-concurrent-reconciles=1"
value:
- "--auto-scaling-runner-set-only"
- "--log-level=debug"
- "--log-format=text"
- "--autoscaling-runner-set-max-concurrent-reconciles=2"
- "--autoscaling-listener-max-concurrent-reconciles=2"
- "--ephemeral-runner-set-max-concurrent-reconciles=2"
- "--ephemeral-runner-max-concurrent-reconciles=4"
- "--listener-metrics-addr=0"
- "--listener-metrics-endpoint="
- "--metrics-addr=0"
- it: should include every max-concurrent-reconciles flag when configured
set:
controller:
manager:
config:
defaultMaxConcurrentReconciles: 4
autoscalingRunnerSetMaxConcurrentReconciles: 3
autoscalingListenerMaxConcurrentReconciles: 5
ephemeralRunnerSetMaxConcurrentReconciles: 6
@@ -109,9 +107,6 @@ tests:
name: "test-arc"
namespace: "test-ns"
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--default-max-concurrent-reconciles=4"
- contains:
path: spec.template.spec.containers[0].args
content: "--autoscaling-runner-set-max-concurrent-reconciles=3"
@@ -28,15 +28,16 @@ controller:
# Defaults to watch all namespaces when unset.
watchSingleNamespace: ""
# The maximum number of concurrent reconciles applied to every controller that does not
# set its own value below. Defaults to 1 when unset.
defaultMaxConcurrentReconciles: null
# Per-controller overrides. Each defaults to defaultMaxConcurrentReconciles when unset.
autoscalingRunnerSetMaxConcurrentReconciles: null
autoscalingListenerMaxConcurrentReconciles: null
ephemeralRunnerSetMaxConcurrentReconciles: null
ephemeralRunnerMaxConcurrentReconciles: null
# The maximum number of concurrent reconciles for each controller, set directly
# per controller.
autoscalingRunnerSetMaxConcurrentReconciles: 2
autoscalingListenerMaxConcurrentReconciles: 2
ephemeralRunnerSetMaxConcurrentReconciles: 2
# The EphemeralRunner controller is higher because it is the only one of the four that
# routinely has many distinct objects to reconcile at once, one per runner.
# controller-runtime serialises reconciles per object, so extra workers on the other
# three only pay off when many runner scale sets exist.
ephemeralRunnerMaxConcurrentReconciles: 4
# List of label prefixes that should NOT be propagated to internal resources.
excludeLabelPropagationPrefixes: []