65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: platform-services
|
|
namespace: argocd
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-5"
|
|
argocd.argoproj.io/sync-options: Prune=confirm,Delete=confirm
|
|
spec:
|
|
goTemplate: true
|
|
goTemplateOptions:
|
|
- missingkey=error
|
|
generators:
|
|
- list:
|
|
elements:
|
|
- component: vault
|
|
cluster: dev-k3s
|
|
server: https://kubernetes.default.svc
|
|
namespace: vault
|
|
path: clusters/dev-k3s/overlays/platform/vault
|
|
autoSync: "true"
|
|
template:
|
|
metadata:
|
|
name: "{{ .component }}-{{ .cluster }}"
|
|
annotations:
|
|
argocd.argoproj.io/sync-options: Prune=confirm,Delete=confirm
|
|
project-gitops.io/auto-sync-gate: "{{ .autoSync }}"
|
|
labels:
|
|
project-gitops.io/cluster: "{{ .cluster }}"
|
|
project-gitops.io/owner: platform
|
|
spec:
|
|
project: platform-services
|
|
source:
|
|
repoURL: https://git.learn.hyeonworks.com/donghyeon.kang/project-gitops
|
|
targetRevision: main
|
|
path: "{{ .path }}"
|
|
destination:
|
|
server: "{{ .server }}"
|
|
namespace: "{{ .namespace }}"
|
|
syncPolicy:
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
- PruneLast=true
|
|
- FailOnSharedResource=true
|
|
retry:
|
|
limit: 5
|
|
refresh: true
|
|
backoff:
|
|
duration: 5s
|
|
factor: 2
|
|
maxDuration: 3m
|
|
revisionHistoryLimit: 5
|
|
templatePatch: |
|
|
{{- if eq .autoSync "true" }}
|
|
spec:
|
|
syncPolicy:
|
|
automated:
|
|
enabled: true
|
|
prune: true
|
|
selfHeal: true
|
|
{{- end }}
|
|
syncPolicy:
|
|
applicationsSync: create-update
|
|
preserveResourcesOnDeletion: true
|