Feedback

Chat Icon

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Sync Policy: Every Field, Every Sync Option, Every Annotation
45%

Automating Synchronization

We will reuse the previous example, but focus on the syncPolicy field. Here is the YAML:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: todo-app
  namespace: argocd
spec:
  destination:
    namespace: default
    server: https://kubernetes.default.svc
  project: default
  source:
    path: manifests
    repoURL: $GITLAB_URL
    targetRevision: main
  # This is the sync policy
  syncPolicy:
    automated:
      prune: true

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Enroll now to unlock all content and receive all future updates for free.