Skip to content

Instantly share code, notes, and snippets.

@ranrubin
Last active May 10, 2022 15:19
Show Gist options
  • Save ranrubin/f701981dda923b92c96387f2c2b8731d to your computer and use it in GitHub Desktop.
Save ranrubin/f701981dda923b92c96387f2c2b8731d to your computer and use it in GitHub Desktop.
An example for app-of-apps applications template
{{- range $app := .Values.argocdApplications -}}
{{ if not .disable }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ .name }}-{{ $.Values.global.env }}
namespace: argocd
spec:
project: {{ $.Values.global.spec.project }}
source:
repoURL: {{ $.Values.global.spec.source.repoURL }}
targetRevision: {{ default $.Values.global.spec.source.targetRevision .targetRevision }}
path: charts/{{ .name }}
{{- if default $.Values.global.helmDefault .helm }}
helm:
valueFiles:
- {{ $.Values.global.valuesFile }}
{{- end }}
destination:
namespace: {{ default $.Values.global.spec.destination.namespace .namespace }}
server: {{ $.Values.global.spec.destination.server }}
syncPolicy:
{{- if not .disableAutomated }}
automated:
prune: false
selfHeal: true
allowEmpty: false
{{- end }}
syncOptions:
- CreateNamespace=true
---
{{- end }}
{{- end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment