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:
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/cache/internal/cache_reader.go#L109
writer:
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/unstructured_client.go#L130
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:
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/cache/internal/cache_reader.go#L109
writer:
https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/unstructured_client.go#L130