Repository navigation
How Argo CD treats dynamically created resource not part of git manifests #28842
Replies: 3 comments
|
Argo CD mainly compares two sets:
For your example, the important annotation is probably not argocd.argoproj.io/tracking-id: test-wiz-app:/Secret:wiz/test-wiz-app-connectorThat annotation tells Argo CD that the live Secret belongs to
So I would check these things:
For generated/runtime Secrets, the usual fixes are:
In short: a dynamically created resource with an Argo tracking id can be considered part of the Application's live set, but if it is missing from Git/Helm output, Argo still has no desired manifest for it. |
|
Thank you for the response @initial-d In my case, wiz has a Job : kubernetes-connector-create available in the manifests that create this secret file. So this secret is taking annotation from that Job. But as you mentioned since its not present in the manifests and I have prune: false, so for every sync operation it deletes the wiz-sec-connector secret in my cluster. how can I avoid the annotation for the secret? Since its dynamically created during runtime, I cannot patch it. |
|
If
With prune disabled, normal extraneous-resource pruning should not delete it. So if it disappears during every sync, I would suspect the hook path or the Wiz job/chart behavior more than ordinary Argo pruning. You can confirm the actor by checking the Secret events/audit trail around sync time: kubectl get events -n wiz --sort-by=.lastTimestamp | grep test-wiz-app-connector
kubectl get secret -n wiz test-wiz-app-connector -o yamlIf the Secret has For avoiding the copied tracking annotation: if the Secret is created dynamically by the Wiz Job and the Job copies its own annotations to the Secret, Argo CD cannot prevent that with an The clean fixes are usually chart/app-level:
As a last-resort Argo-side workaround, you can look at orphaned/extraneous resource handling or resource exclusions, but those are broad tools and will not fix a hook/job that actively deletes and recreates the Secret. The first thing I would prove is who deletes it: Argo application-controller prune, Argo hook cleanup, or the Wiz job itself. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi
I am using Argo CD chart version: 10.1.3
EKS cluster 1.34 with Auto Mode enabled
I am installing wiz in my EKS cluster. Wiz creates a dynamic secret with helm hook annotation like this:
Can someone explain the below:
How does Argo CD treat dynamically created resources that have helm.sh/hook annotations but are not part of the desired manifests?
All reactions