khuedoan-homelab/bootstrap/root/templates/stack.yaml
Khue Doan a282bb0bb8 fix(bootstrap): add missing revision in template
(cherry picked from commit 1f019f67a677b4295e10b69501c02ae4909bb704)
2022-02-09 19:02:59 +07:00

40 lines
1009 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}}` }}'
targetRevision: {{ $.Values.gitops.revision }}
syncPolicy:
automated:
prune: true
selfHeal: true
retry:
limit: 10
backoff:
duration: 1m
factor: 2
maxDuration: 16m
syncOptions:
- CreateNamespace=true
{{- end }}