_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

ArgoCD — Advanced Configuration

21. 11. 2023 1 min read intermediate

DevOps Expert

ArgoCD — Advanced Configuration

ArgoCDGitOpsKubernetesMulti-cluster 5 min read

ArgoCD ApplicationSets, multi-cluster management, Sync Waves and hook-based deployments.

ApplicationSets

ApplicationSet controller generates ArgoCD Applications dynamically — ideal for multi-cluster and multi-tenant scenarios.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: microservices
spec:
  generators:
    - git:
        repoURL: https://github.com/org/manifests
        revision: main
        directories:
          - path: apps/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: default
      source:
        repoURL: https://github.com/org/manifests
        targetRevision: main
        path: '{{path}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{path.basename}}'

Sync Waves & Hooks

Sync waves control deployment order. Hooks run jobs in specific phases of sync cycle.

metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "-1"
    argocd.argoproj.io/hook: PreSync
---
apiVersion: batch/v1
kind: Job
metadata:
  name: db-migration
  annotations:
    argocd.argoproj.io/hook: PreSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  template:
    spec:
      containers:
        - name: migrate
          image: app:latest
          command: ["/migrate"]
      restartPolicy: Never

Multi-cluster Management

ArgoCD can manage dozens of clusters from single instance.

# Adding cluster
argocd cluster add prod-eu-west-1 --name prod-eu
# Declarative Secret
apiVersion: v1
kind: Secret
metadata:
  name: prod-cluster
  namespace: argocd
  labels:
    argocd.argoproj.io/secret-type: cluster
stringData:
  name: prod-eu
  server: https://prod-eu.example.com
  config: |
    {"bearerToken": "...", "tlsClientConfig": {"insecure": false}}

Summary

ArgoCD advanced features like ApplicationSets and Sync Waves enable scaling GitOps to enterprise level.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.