Files
platform-state/argocd/applicationsets/services-prod.yaml
T

39 lines
1.0 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: services-prod
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "20"
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://git.dahyeon.us/dahyeon/service-state.git
revision: main
directories:
- path: apps/*/overlays/prod
template:
metadata:
name: "{{index .path.segments 1}}-prod"
spec:
project: services-prod
source:
repoURL: https://git.dahyeon.us/dahyeon/service-state.git
targetRevision: main
path: "{{.path.path}}"
destination:
server: https://kubernetes.default.svc
namespace: "{{index .path.segments 1}}-prod"
templatePatch: |
{{- if or (eq (index .path.segments 1) "url-shortener") (eq (index .path.segments 1) "make-space") }}
spec:
syncPolicy:
automated:
prune: true
selfHeal: true
{{- else }}
{}
{{- end }}