khuedoan-homelab/bootstrap/root/templates/stack.yaml
Khue Doan cb1b80e34a Revert "perf(argocd): skip dry run for new CRD"
This reverts commit 377b02a6ea.

This option is resource specific, need to add an annotation to each one.
e284fd71cb/pkg/sync/sync_context.go (L734)
2022-12-24 14:11:17 +07:00

42 lines
1.1 KiB
YAML

{{- range $index, $stack := .Values.stacks }}
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: {{ $stack.name }}
namespace: {{ $.Release.Namespace }}
spec:
generators:
- git:
repoURL: {{ $.Values.gitops.repo }}
revision: {{ $.Values.gitops.revision }}
directories:
- path: {{ $stack.name }}/*
template:
metadata:
name: '{{ `{{path.basename}}` }}'
spec:
destination:
name: in-cluster
namespace: '{{ default `{{path.basename}}` $stack.namespace }}'
project: default # TODO
source:
repoURL: {{ $.Values.gitops.repo }}
path: '{{ `{{path}}` }}'
targetRevision: {{ $.Values.gitops.revision }}
syncPolicy:
automated:
prune: true
selfHeal: true
retry:
limit: 10
backoff:
duration: 1m
factor: 2
maxDuration: 16m
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
- ServerSideApply=true
{{- end }}