Files
haven/apps/root/applicationset.yaml
2026-09-02 19:53:17 -03:00

47 lines
1.2 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: haven-apps
namespace: argocd
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://git.ivanch.me/ivanch/haven.git
revision: main
files:
- path: "apps/*/*.yaml"
- path: "apps/root/*.yaml"
exclude: true
template:
metadata:
name: '{{ .path.filename | trimSuffix ".yaml" }}'
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://git.ivanch.me/ivanch/haven.git
targetRevision: main
path: "{{ .path.path }}"
directory:
include: "{{ .path.filename }}"
destination:
server: https://kubernetes.default.svc
namespace: "{{ index .path.segments 1 }}"
syncPolicy:
automated:
prune: true
selfHeal: true
templatePatch: |
{{- if hasKey . "chart" }}
spec:
source:
$patch: replace
{{- toYaml .spec.source | nindent 4 }}
syncPolicy:
syncOptions: [CreateNamespace=true, ServerSideApply=true]
{{- end }}