1
0
Fork 0
k8s-cluster-aegir/apps-root-config/applications/templates/argo-application.yaml

56 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2025-01-11 20:58:54 +00:00
{{- range $key, $value := .Values.applications -}}
{{- $disabled := default false .disabled }}
{{- $destinationNamespace := default $key .destinationNamespace }}
{{- $server := "https://kubernetes.default.svc" }}
{{- $project := default $.Release.Name .project }}
{{- $path := default (printf "%s/%s" $.Values.subFolder $key) .path }}
{{- $source := default false .source }}
{{- $disableAutoSync := default false .disableAutoSync }}
{{- $enableHelmKustomize := default false .enableHelmKustomize }}
{{- $automatedPrune := default true .automatedPrune }}
{{- $selfHeal := default true .selfHeal }}
{{- $helmServerSideApply := default false .helmServerSideApply }}
{{- $ignoreDifferences := default false .ignoreDifferences }}
{{- if not $disabled }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/sync-wave: "10"
name: {{ $key }}
2025-01-11 22:11:40 +00:00
namespace: {{ default "argocd" $.Values.argocdNamespace }}
2025-01-11 20:58:54 +00:00
spec:
destination:
namespace: {{ default $key $destinationNamespace }}
name: in-cluster
# server: {{ default $server }}
project: {{ $project }}
source:
path: {{ $path }}
repoURL: {{ $.Values.repository }}
{{ if $source -}}
{{- toYaml $source | indent 4 }}
{{- end }}
{{- if $enableHelmKustomize }}
plugin:
name: kustomized-helm
{{- end }}
{{- if $ignoreDifferences }}
ignoreDifferences:
{{ toYaml $ignoreDifferences | indent 4 }}
{{- end }}
{{- if not $disableAutoSync }}
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
{{- if $helmServerSideApply }}
- ServerSideApply=true
{{- end }}
automated:
prune: {{ default true $automatedPrune }}
selfHeal: {{ default true $selfHeal }}
{{- end }}
{{- end }}
{{ end }}