I’ve been using ArgoCD as my GitOps toolkit for my Kubernetes home lab for many years, nothing major to complain. I wanted to test canary deployment with Argo Rollouts with which Istio is supported. However Argo Rollouts is not really GitOps friendly – it modifies weight
of routes without commit to git repository, to gradually rollout a new release.
In order to get these 3 to work together, ArgoCD needs to stay cool and ignore the weight
changes done by Argo Rollouts. Here’s how I did it with ArgoCD’s global configuration(argocd-cm config map):
# argocd-cm data: resource.customizations.ignoreDifferences.networking.istio.io_VirtualService: |- jqPathExpressions: - ".spec.http[]?.route[]?.weight"
And to make sure the weight
will not be wiped back to its original value during a sync, an options is needed for the ArgoCD application:
# in an ArgoCD Application spec: syncPolicy: syncOptions: - RespectIgnoreDifferences=true
I also restarted the repo servers to make sure the new configurations are loaded.
k rollout restart deploy argocd-repo-server
Ref.
- https://argo-cd.readthedocs.io/en/release-2.4/user-guide/sync-options/#respect-ignore-difference-configs
- https://github.com/argoproj/argo-cd/issues/2913
🙂