Argo CD Sync Policies and Options

Sync Options

Automated Sync Policy

syncPolicy:
automated: {}
--auto-sync

Automated Pruning

syncPolicy:
automated:
prune: true
# argocd app create helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-server https://kubernetes.default.svc --dest-namespace argohelmtest  --auto-prune

Self-Healing

syncPolicy:
automated:
selfHeal: true
# argocd app create helm-guestbook --repo  https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-server https://kubernetes.default.svc --dest-namespace argohelmtest  --self-heal

No Prune — Specific Resources

metadata:
annotations:
argocd.argoproj.io/sync-options: Prune=false

Disable Kubectl Validation

metadata:
annotations:
argocd.argoproj.io/sync-options: Validate=false

Selective Sync

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true

Prune Last

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
syncOptions:
- PruneLast=true
metadata:
annotations:
argocd.argoproj.io/sync-options: PruneLast=true

Replace Resource

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
FoxuTech

FoxuTech

61 Followers

Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/