-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostDelete Hook with other resources than pod/job (like SA) #17191
Comments
Related to #16595 |
@dtrouillet Can you describe specifically what you expect will happen in this case? Are you saying A) the Application should be deleted, but isn't? Or B) are you saying the Application is deleted, but shouldn't be? From the docs: "Using a PostDelete hook to run clean-up or finalizer logic after all Application resources are deleted. Please note that PostDelete hooks are only deleted if the delete policy matches the aggregated deletion hooks status and not garbage collected after the application is deleted. " My read of the dos is that the PostDelete hook does not prevent the deletion of the Application. AFAICT It is primarily used for post-delete notifications. |
@jgwest I expect the application to be deleted after the Hook (A). But in my case (the bug in question), my application is not deleted. It remains in "deleting", the hook was executed successfully (pod completed). I was expecting the hook to be deleted as well as the application. For information, I use this hook to annotate the namespace with a view to destroying it later (to compensate for the lack of "DeleteNamespace") |
IIUC, the Application is deleted before the post-delete hooks run. But the Application will hang around until the post-delete finalizers are removed - which happens after success? I think all the resource hooks are handled individually, and so the problem is likely that your service account or role or role binding was deleted as soon as it was applied (HookSuccess). I suggest using something like ArgoWorkflows to run multi-resource resource hooks. I suspect this bug should be closed as Won't Fix or Not Planned. |
I have the same problem. My I've noticed that the |
same problem here, my |
ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please? |
I have seen the same problem with ArgoCD 2.12.3, so I guess the problem is still there. |
Checklist:
argocd version
.Describe the bug
When I create a PostDelete hook with other resources like ServiceAccount, Role, RoleBinding, even if the hook succeed, the Application stay in Deleted state.
To Reproduce
Create resources like ServiceAccount, Role, RoleBinding and Pod/Job that use this ServiceAccount to works.
You can view this repo : https://github.com/dtrouillet/postdelete-hook-issue2
Expected behavior
Application is deleted after hook execution
Screenshots
Version
argocd: v2.10.0+2175939
BuildDate: 2024-02-06T14:28:43Z
GitCommit: 2175939
GitTreeState: clean
GoVersion: go1.21.3
Compiler: gc
Platform: linux/amd64
Logs
No logs
The text was updated successfully, but these errors were encountered: