Reputation: 339
I have five applications with app of apps config in ArgoCD, each with different sync-waves specified.
How do I introduce a delay of 40 seconds for each synchronization wave?
I am aware that the documentation says that "The current delay between each sync wave is 2 seconds and can be configured via environment variable ARGOCD_SYNC_WAVE_DELAY" but setting this env variable by means of configmap doesn't help at all. Anyone has tried this ever or is it even possible with any version of Argocd? Argocd version which I am using is v2.4.2.
Have tried updating the argocd-cm configmap
k edit cm argocd-cm -n argocd
apiVersion: v1
data:
ARGOCD_SYNC_WAVE_DELAY: "40"
Have applied this configmap:
kubectl describe cm argocd-sync-delay-config -n om
Name: argocd-sync-delay-config
Namespace: om
Labels: <none>
Annotations: <none>
Data
====
ARGOCD_SYNC_WAVE_DELAY:
----
40
BinaryData
====
Events: <none>
Upvotes: 0
Views: 513
Reputation: 170
The env ARGOCD_SYNC_WAVE_DELAY
is used by the argocd application-controller.
In order to set a custom value you can run:
kubectl edit statefulsets.apps argocd-application-controller
and add this to the container's env
- name: ARGOCD_SYNC_WAVE_DELAY
value: "40"
OR, following other params from ArgoCD's documentation (ex. operation.processors) you can use them from the config-map but you will still need to add them to the controller since they are missing:
kubectl edit cm argocd-cmd-params-cm
add:
data:
controller.sync.delay: "40"
then edit controller's env:
- name: ARGOCD_SYNC_WAVE_DELAY
valueFrom:
configMapKeyRef:
key: controller.sync.delay
name: argocd-cmd-params-cm
optional: true
Keep in mind that generally the default value should be enough for most of the use cases and, depending on the needs, you might check also healthchecks and pre/post sync hooks
Upvotes: 1