Skip to content

Commit

Permalink
Merge pull request #77 from projectsyn/add-argocd-orphan
Browse files Browse the repository at this point in the history
Add app finalizers config
  • Loading branch information
zugao authored Aug 8, 2024
2 parents e88ec95 + 805bef4 commit 16beda6
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ parameters:
namespaceLabels: {}
namespaceAnnotations: {}

argocd:
application:
finalizers:
- resources-finalizer.argocd.argoproj.io
charts:
crossplane: 1.12.3
images:
Expand Down
3 changes: 3 additions & 0 deletions component/app.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] +
Expand Down
9 changes: 9 additions & 0 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
ignoreDifferences:
- group: rbac.authorization.k8s.io
Expand Down
3 changes: 3 additions & 0 deletions tests/golden/defaults/crossplane/apps/crossplane.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
ignoreDifferences:
- group: rbac.authorization.k8s.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
ignoreDifferences:
- group: rbac.authorization.k8s.io
Expand Down
3 changes: 3 additions & 0 deletions tests/golden/openshift4/crossplane/apps/crossplane.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
ignoreDifferences:
- group: rbac.authorization.k8s.io
Expand Down

0 comments on commit 16beda6

Please sign in to comment.