Cloud-native workloads to operate a Kubernetes cluster.

Resources

/applicationset.yaml
Copied!
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet

metadata:
  name: <your-project>
  namespace: argocd

spec:
  generators:
    - matrix:
        generators:
          - merge:
              mergeKeys:
                - name
              generators:
                - clusters: {}
                - list:
                    elements:
                      - name: in-cluster
                        overlay: local
                      - name: production
                        overlay: prod
          - git:
              repoURL: https://gitlab.com/<your-project>.git
              revision: main
              directories:
                - path: core/base/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: <your-project>
      source:
        repoURL: https://gitlab.com/<your-project>.git
        targetRevision: main
        path: 'core/overlays/{{overlay}}/{{path.basename}}'
      destination:
        server: '{{server}}'
      syncPolicy:
        automated:
          prune: false
          selfHeal: true
        retry:
          limit: 15
          backoff:
            duration: 15s
            factor: 2
            maxDuration: 5m
        syncOptions:
          - CreateNamespace=true
          - ApplyOutOfSyncOnly=true
          - PruneLast=true

References