Skip to content
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

Unable to delete cluster-scoped resources with the Kubernetes object trigger #3300

Open
tvandinther opened this issue Sep 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@tvandinther
Copy link

Describe the bug
When using the Kubernetes object trigger to delete a cluster-scoped resource (such as a persistent volume), the message object not found, nothing to delete... is logged.

To Reproduce
Delete any cluster-scoped resource (other than namespace or node) using the Kubernetes object trigger.

Expected behavior
The resource should be identified as cluster-scoped and found and deleted appropriately.

Environment (please complete the following information):

  • Kubernetes: v1.30
  • Argo Events: v1.9.1

Additional context
It is possible this issue affects operations other than Delete. I noticed that in this part of the code, only namespaces and nodes are listed as cluster-scoped resources. Following a static analysis of the code, I presume the namespace is set to the sensor namespace and subsequently not found.

I'd expect that this issue is fixed by making the list exhaustive (for standard resources), or a new mechanism used to determine cluster-scoped resources so that cluster-scoped CRs can also be identified.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@tvandinther tvandinther added the bug Something isn't working label Sep 23, 2024
@tvandinther
Copy link
Author

This may be fixed upstream if the dynamic client is amended to find cluster-scoped resources even when a namespace is set as per this issue: kubernetes/kubernetes#111248

It also seems that this stale issue covers the same problem: #3132

@tvandinther tvandinther changed the title Unable to delete cluster-scoped resourced with the object trigger Unable to delete cluster-scoped resources with the Kubernetes object trigger Sep 23, 2024
@whynowy
Copy link
Member

whynowy commented Sep 24, 2024

This may be fixed upstream if the dynamic client is amended to find cluster-scoped resources even when a namespace is set as per this issue: kubernetes/kubernetes#111248

It also seems that this stale issue covers the same problem: #3132

Would you like to submit a PR to add those (maybe not all but often used) cluster scope resources?

@tvandinther
Copy link
Author

If you're happy with that approach I can submit the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants