kubernetes-sigs / kubernetes-sigs/controller-runtime
The filtering behavior of List() and DeleteAllOf() are different when they are used with the "InNamespace" predicate.
Open
@dlanov is already working on this.
Since Jul 20, 2026.
help wanted
lifecycle/frozen
priority/awaiting-more-evidence
- Dominant language
- Go
- Stars
- 3k
- Forks
- 1.3k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 14
Description
Hi, I'm using operator-sdk. When I'm using the k8s client provided by controller-manager constructed by operator-sdk, I found the following surprising things:
I am accidentally trying to delete CRs under a certain namespace, which is a mistake because the CR was defined in cluster scope. The strange thing is that DeleteAllOf() removes all CRs in the cluster, but List() didn't return any result.
The relevant code probably is:
cache_reader:
writer:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.