Currently, when spec.controller.sharding.dynamicScalingEnabled feature is enabled on argocd-controller, we do not update the environment variable ARGOCD_CONTROLLER_REPLICAS with the correct number of replicas on the argocd-application-controller statefulset.
The PR fixes the logic of setting the number of replicas correctly in the environment variable of the statefulset pods.
What type of PR is this?
/kind bug
What does this PR do / why we need it:
Currently, when
spec.controller.sharding.dynamicScalingEnabled
feature is enabled on argocd-controller, we do not update the environment variableARGOCD_CONTROLLER_REPLICAS
with the correct number of replicas on theargocd-application-controller
statefulset.The PR fixes the logic of setting the number of replicas correctly in the environment variable of the statefulset pods.
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes https://issues.redhat.com/browse/GITOPS-3465
How to test changes / Special notes to the reviewer: