Application Manifest
Recurse directory
argocd app create <app-name> ... --directory-recurse
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
directory:
recurse: true
Automatic sync
argocd app create <app-name> ... --sync-policy automated
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated: {}
Create namespace
argocd app create <app-name> ... --sync-option CreateNamespace=true
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
syncOptions:
- CreateNamespace=true
Selective sync
argocd app create <app-name> ... --sync-option ApplyOutOfSyncOnly=true
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated: {}
syncOptions:
- ApplyOutOfSyncOnly=true
Disable sync in shared resource
argocd app create <app-name> ... --sync-option FailOnSharedResource=true
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated: {}
syncOptions:
- FailOnSharedResource=true
Automatic prune
argocd app create <app-name> ... --sync-policy automated --auto-prune
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated:
prune: true
Self healing
argocd app create <app-name> ... --sync-policy automated --self-heal
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated:
selfHeal: true
Prevent pruning resource
apiVersion: ...
kind: ...
metadata:
annotations:
argocd.argoproj.io/sync-options: Prune=false
Replace resource
argocd app create <app-name> ... --sync-option Replace=true
apiVersion: ...
kind: ...
metadata:
annotations:
argocd.argoproj.io/sync-options: Replace=true
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
syncPolicy:
automated: {}
syncOptions:
- Replace=true