2 min read | by Jordi Prats
Although it's shouldn't be like this, resources ordering can play an important role to successfully deploy your application. We can use ArgoCD's phases and sync waves to tell it how (object dependencies) to deploy the manifest.
When ArgoCD starts a sync operation it takes into account the phase and the wave we have configured. To configure them we can use the following annotations:
Additionally, it will sort resources by Kind and finally by Name
To determine the wave it needs to apply, it uses the lowest number of any resources that are out-of-sync or unhealthy, the default wave is 0. As soon as it applies the resources repeats until all phases and waves are in-sync and healthy.
To give some time for the controllers to react to updates, there's a delay between each sync wave that can be configured using the following environment variable: ARGOCD_SYNC_WAVE_DELAY
apiVersion: v1
kind: Secret
metadata:
name: vault-token
data:
token: dGVzdA==
---
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: testvault-backend
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
provider:
vault:
server: "http://testvault.testvault.svc.cluster.local:80"
path: "secret"
version: "v2"
auth:
tokenSecretRef:
name: "vault-token"
key: "token"
Posted on 03/01/2023