apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: customer-applications namespace: argocd spec: goTemplate: true goTemplateOptions: ["missingkey=error"] generators: - git: repoURL: 'https://platform.sunet.se/Drive/k8s-manifests' revision: HEAD directories: - path: 'customers/overlays/*/test' template: metadata: name: '{{index .path.segments 2}}' spec: project: default source: repoURL: 'https://platform.sunet.se/Drive/k8s-manifests' targetRevision: HEAD path: 'customers/overlays/{{index .path.segments 2}}' destination: server: https://kubernetes.default.svc namespace: '{{index .path.segments 2}}' syncPolicy: automated: prune: false selfHeal: true allowEmpty: false syncOptions: # maybe needs FIXME - Validate=true # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ). - CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster. - PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan. - PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation - RespectIgnoreDifferences=true # When syncing changes, respect fields ignored by the ignoreDifferences configuration - ApplyOutOfSyncOnly=true # Only sync out-of-sync resources, rather than applying every object in the application retry: limit: 5 backoff: duration: 5s factor: 2 maxDuration: 3m revisionHistoryLimit: 2