What did you do to encounter the bug?
Steps to reproduce the behavior:
- Delete existing resource
What did you expect?
Cleanup of affected resources
What happened instead?
Resources are not cleaned up
Screenshots
Operator Information
- Operator Version: 1.4
- MongoDB Image used
Kubernetes Cluster Information
Additional context
We have watchedNamespaces = '*' so we are using the cluster roles
Operator logs give errors that deletecollection is not allowed for Service, ConfigMap, StatefulSet and Secrets
I believe this API call: https://github.com/mongodb/mongodb-kubernetes/blob/master/controllers/operator/mongodbopsmanager_controller.go#L787 uses deletecollection