mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-10 07:16:57 +07:00
39 lines
954 B
YAML
39 lines
954 B
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}}` }}'
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
retry:
|
|
limit: 10
|
|
backoff:
|
|
duration: 1m
|
|
factor: 2
|
|
maxDuration: 16m
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
{{- end }}
|