Prior to #5 we had 1. in place, since we created a standalone namespace for each SIPCluster for service resources to be created in, so when the SIPCluster was deleted we could simply delete that namespace. Now that we are creating service objects in the SIPCluster CR namespace, we should be deleting those objects each individually (as opposed to the whole namespace) when the SIPCluster is deleted.
Steps To Reproduce
Delete a CIPCluster CR, notice the generated objects are not deleted.
Delete a Service which was generated for a CR, not it is not automatically re-created (until the CR itself is reconciled again due to some CR change).
Describe the bug
Any objects generated by a controller should be:
The controller-runtime has an API which can be used to accomplish both of these pretty easily: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil#SetControllerReference
Prior to #5 we had 1. in place, since we created a standalone namespace for each SIPCluster for service resources to be created in, so when the SIPCluster was deleted we could simply delete that namespace. Now that we are creating service objects in the SIPCluster CR namespace, we should be deleting those objects each individually (as opposed to the whole namespace) when the SIPCluster is deleted.
Steps To Reproduce