-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Describe the bug
The recent Post-Delete hook support PR, mutate the Application object when refreshing by adding two finalizers if a resource have a "helm.sh/hook": post-delete annotation.
In an apps of apps context it causes unnecesssary reconciliations due to object updated:
{"api-version":"argoproj.io/v1alpha1","application":"myRootApp","cluster-name":"myCluster","fields.level":0,"kind":"Application","level":"debug","msg":"Requesting app refresh caused by object update","name":"myApp","namespace":"argo-cd","server":"myServer","time":"2024-03-07T08:14:40Z"}
To Reproduce
Create an Application that deploy another Application, in the nested Application deploy a resource that have a "helm.sh/hook": post-delete annotation. Wait for the 3m default refresh interval and search for the Requesting app refresh caused by object update debug log line.
Expected behavior
Do not mutate the Application object or at least maybe automaticaly ignore thoses finalizers like it is currently done for the metadata fields generation and resourceVersion
Version
argocd: v2.10.2+fcf5d8c
BuildDate: 2024-03-01T21:24:51Z
GitCommit: fcf5d8c2381b68ab1621b90be63913b12cca2eb7
GitTreeState: clean
GoVersion: go1.21.3
Compiler: gc
Platform: linux/amd64