feat(argo-cd): Add support for application controller dynamic cluster distribution. (#2539)

* Add support for application controller dynamic cluster distribution.

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>

* Added env variables to handle the non-standard names generated by the helm chart.
https://argo-cd.readthedocs.io/en/release-2.9/user-guide/environment-variables/
99723143b9/common/common.go (L252)

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>

---------

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>
This commit is contained in:
Oscar Wieman 2024-02-25 13:47:00 +01:00 committed by GitHub
parent 42b20e0b6b
commit 7c8fab5a7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 413 additions and 2 deletions

View file

@ -577,8 +577,22 @@ controller:
# -- The number of application controller pods to run.
# Additional replicas will cause sharding of managed clusters across number of replicas.
## With dynamic cluster distribution turned on, sharding of the clusters will gracefully
## rebalance if the number of replica's changes or one becomes unhealthy. (alpha)
replicas: 1
# -- Enable dynamic cluster distribution (alpha)
# Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/dynamic-cluster-distribution
## This is done using a deployment instead of a statefulSet
## When replicas are added or removed, the sharding algorithm is re-run to ensure that the
## clusters are distributed according to the algorithm. If the algorithm is well-balanced,
## like round-robin, then the shards will be well-balanced.
dynamicClusterDistribution: false
# -- Application controller heartbeat time
# Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/dynamic-cluster-distribution/#working-of-dynamic-distribution
heartbeatTime: 10
# -- Maximum number of controller revisions that will be maintained in StatefulSet history
revisionHistoryLimit: 5
@ -662,6 +676,9 @@ controller:
# -- Annotations for the application controller StatefulSet
statefulsetAnnotations: {}
# -- Annotations for the application controller Deployment
deploymentAnnotations: {}
# -- Annotations to be added to application controller pods
podAnnotations: {}