Skip to content

Commit 4572cf7

Browse files
committed
feat(argocd-understack): clean up App resources when the App is removed
We need to use the finalizer to ensure that the resources are cleaned up when the App is removed.
1 parent 6405779 commit 4572cf7

36 files changed

Lines changed: 72 additions & 0 deletions

charts/argocd-understack/templates/application-argo-events-workflows.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "argo-events-workflows" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-argo-events.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apiVersion: argoproj.io/v1alpha1
33
kind: Application
44
metadata:
55
name: {{ printf "%s-%s" $.Release.Name "argo-events" }}
6+
finalizers:
7+
- resources-finalizer.argocd.argoproj.io
68
annotations:
79
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
810
spec:

charts/argocd-understack/templates/application-argo-workflows.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "argo" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-cert-manager.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "cert-manager" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-chrony.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "chrony" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-cilium.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "cilium" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-cnpg-system.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "cnpg-system" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-dex.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "dex" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-envoy-configs.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "envoy-configs" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

charts/argocd-understack/templates/application-envoy-gateway.yaml.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ apiVersion: argoproj.io/v1alpha1
44
kind: Application
55
metadata:
66
name: {{ printf "%s-%s" $.Release.Name "envoy-gateway" }}
7+
finalizers:
8+
- resources-finalizer.argocd.argoproj.io
79
annotations:
810
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
911
spec:

0 commit comments

Comments
 (0)