feat(argocd): allow per-app syncPolicy override in values.yaml
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>
This commit is contained in:
@@ -21,9 +21,13 @@ spec:
|
|||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: {{ $app_name }}
|
namespace: {{ $app_name }}
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
{{- if $app_attr.syncPolicy }}
|
||||||
|
{{- toYaml $app_attr.syncPolicy | nindent 4 }}
|
||||||
|
{{- else }}
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
|
{{- end }}
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -6,6 +6,10 @@ gitea_applications:
|
|||||||
annotations: {}
|
annotations: {}
|
||||||
tools:
|
tools:
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
webapp:
|
webapp:
|
||||||
annotations:
|
annotations:
|
||||||
argocd-image-updater.argoproj.io/image-list: webapp=gitea.arcodange.lab/arcodange-org/webapp:latest
|
argocd-image-updater.argoproj.io/image-list: webapp=gitea.arcodange.lab/arcodange-org/webapp:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user