Course contentsShow
← Cloud and Infrastructure
Lesson 1892 of 2,98940. ArgoCDFree lesson

Application Spec Structure

Exploring source, destination, syncPolicy, and other Application spec fields.

Application Spec Structure

You'll learn: How the ArgoCD Application spec is organized and what each major field controls in your GitOps deployments.

What Is the Application Spec?

In ArgoCD, every Application resource follows a specific structure defined in its spec section. Think of the spec as a detailed instruction manual that tells ArgoCD where to find your desired state (source), where to deploy it (destination), and how to keep everything synchronized (syncPolicy). Understanding this structure is essential for creating reliable, maintainable GitOps workflows.

Core Spec Fields

Source

The source field defines your Git repository details:

  • repoURL: The Git repository URL
  • path: Directory containing manifests
  • targetRevision: Branch, tag, or commit SHA

This tells ArgoCD where to find your Kubernetes manifests.

Destination

The destination field specifies the target cluster and namespace:

  • server: Kubernetes API server URL (often https://kubernetes.default.svc for in-cluster)
  • namespace: Target namespace for deployment

SyncPolicy

The syncPolicy field controls automation behavior:

  • automated: Enables auto-sync, self-heal, and prune options
  • syncOptions: Additional sync behaviors (like creating namespace if missing)
  • retry: Defines retry logic for failed syncs

Project

References an ArgoCD Project for access control and resource restrictions—connecting to your multi-tenancy setup.

Additional Fields

  • info: Metadata links for documentation
  • ignoreDifferences: Rules to ignore specific field differences during sync
  • revisionHistoryLimit: Number of previous sync states to retain

Key Takeaway: The Application spec's structure—source, destination, syncPolicy, and project—forms the complete contract between your Git repository and your Kubernetes cluster, enabling ArgoCD to maintain continuous synchronization.