diff --git a/charts/rhoso-apps/templates/_helpers.tpl b/charts/rhoso-apps/templates/_helpers.tpl index 6dd9b07..ea53df7 100644 --- a/charts/rhoso-apps/templates/_helpers.tpl +++ b/charts/rhoso-apps/templates/_helpers.tpl @@ -96,3 +96,16 @@ Pass dict with key "app" (per-application values map). {{- $f := default (list "resources-finalizer.argocd.argoproj.io/background") $app.finalizers }} {{- toYaml $f -}} {{- end }} + +{{/* +Optional spec.ignoreDifferences (Argo CD ignoreDifferences). +Pass dict with key "app" (per-application values map). Omitted if unset or empty. +*/}} +{{- define "rhoso-apps.ignoreDifferences" -}} +{{- $app := .app -}} +{{- $ignore := $app.ignoreDifferences | default list }} +{{- if not (empty $ignore) }} + ignoreDifferences: +{{ toYaml $ignore | indent 4 }} +{{- end }} +{{- end }} diff --git a/charts/rhoso-apps/templates/application.yaml b/charts/rhoso-apps/templates/application.yaml index 71ed96f..f6213c8 100644 --- a/charts/rhoso-apps/templates/application.yaml +++ b/charts/rhoso-apps/templates/application.yaml @@ -19,6 +19,7 @@ spec: {{ include "rhoso-apps.sourceKustomize" (dict "app" $app) }} destination: server: {{ include "rhoso-apps.destinationServer" $ }} +{{ include "rhoso-apps.ignoreDifferences" (dict "app" $app) }} {{ include "rhoso-apps.syncPolicySpec" (dict "app" $app) }} {{- end }} {{- end }} diff --git a/charts/rhoso-apps/values.schema.json b/charts/rhoso-apps/values.schema.json index ef154eb..02e0c71 100644 --- a/charts/rhoso-apps/values.schema.json +++ b/charts/rhoso-apps/values.schema.json @@ -111,6 +111,14 @@ "resources-finalizer.argocd.argoproj.io/foreground" ] } + }, + "ignoreDifferences": { + "type": "array", + "description": "Argo CD spec.ignoreDifferences to ignore fields during sync comparison.", + "items": { + "type": "object", + "additionalProperties": true + } } } }