The apps template hardcoded automated{prune,selfHeal} for every app. Some
apps (e.g. tools, where Vault unseal is manual) need a custom syncPolicy
without selfHeal. Read $app_attr.syncPolicy when set, fall back to the
existing automated default otherwise. Use the override on `tools` to keep
the existing behavior explicit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
805 B
YAML
33 lines
805 B
YAML
{{- range $app_name, $app_attr := .Values.gitea_applications -}}
|
|
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: {{ $app_name }}
|
|
namespace: argocd
|
|
finalizers:
|
|
- resources-finalizer.argocd.argoproj.io
|
|
{{- with $app_attr.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://gitea.arcodange.lab/arcodange-org/{{ $app_name }}
|
|
targetRevision: HEAD
|
|
path: chart
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: {{ $app_name }}
|
|
syncPolicy:
|
|
{{- if $app_attr.syncPolicy }}
|
|
{{- toYaml $app_attr.syncPolicy | nindent 4 }}
|
|
{{- else }}
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
{{- end }}
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
{{ end }} |