diff --git a/class/defaults.yml b/class/defaults.yml index baa68b0..9236ac8 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -4,6 +4,10 @@ parameters: namespaceLabels: {} namespaceAnnotations: {} + argocd: + application: + finalizers: + - resources-finalizer.argocd.argoproj.io charts: crossplane: 1.12.3 images: diff --git a/component/app.jsonnet b/component/app.jsonnet index 9d95e41..6c6b2b4 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -19,6 +19,9 @@ local ignore_diff_cr = { }; local app = argocd.App('crossplane', params.namespace) { + metadata+: { + finalizers: params.argocd.application.finalizers, + }, spec+: { ignoreDifferences: [ ignore_diff_cr ] + diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index b93555b..c57b8dd 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -206,3 +206,12 @@ parameters: requests: cpu: 1000m ---- + + +== `argocd.application.finalizers` + +[horizontal] +type:: array +default:: `[- resources-finalizer.argocd.argoproj.io]` + +This parameter allows to configure ArgoCD App finalizers. diff --git a/tests/golden/defaults-with-provider/crossplane/apps/crossplane.yaml b/tests/golden/defaults-with-provider/crossplane/apps/crossplane.yaml index 921fb82..101f293 100644 --- a/tests/golden/defaults-with-provider/crossplane/apps/crossplane.yaml +++ b/tests/golden/defaults-with-provider/crossplane/apps/crossplane.yaml @@ -1,3 +1,6 @@ +metadata: + finalizers: + - resources-finalizer.argocd.argoproj.io spec: ignoreDifferences: - group: rbac.authorization.k8s.io diff --git a/tests/golden/defaults/crossplane/apps/crossplane.yaml b/tests/golden/defaults/crossplane/apps/crossplane.yaml index 921fb82..101f293 100644 --- a/tests/golden/defaults/crossplane/apps/crossplane.yaml +++ b/tests/golden/defaults/crossplane/apps/crossplane.yaml @@ -1,3 +1,6 @@ +metadata: + finalizers: + - resources-finalizer.argocd.argoproj.io spec: ignoreDifferences: - group: rbac.authorization.k8s.io diff --git a/tests/golden/openshift4-with-provider/crossplane/apps/crossplane.yaml b/tests/golden/openshift4-with-provider/crossplane/apps/crossplane.yaml index 630ad58..4e36a21 100644 --- a/tests/golden/openshift4-with-provider/crossplane/apps/crossplane.yaml +++ b/tests/golden/openshift4-with-provider/crossplane/apps/crossplane.yaml @@ -1,3 +1,6 @@ +metadata: + finalizers: + - resources-finalizer.argocd.argoproj.io spec: ignoreDifferences: - group: rbac.authorization.k8s.io diff --git a/tests/golden/openshift4/crossplane/apps/crossplane.yaml b/tests/golden/openshift4/crossplane/apps/crossplane.yaml index 630ad58..4e36a21 100644 --- a/tests/golden/openshift4/crossplane/apps/crossplane.yaml +++ b/tests/golden/openshift4/crossplane/apps/crossplane.yaml @@ -1,3 +1,6 @@ +metadata: + finalizers: + - resources-finalizer.argocd.argoproj.io spec: ignoreDifferences: - group: rbac.authorization.k8s.io