Closed clyang82 closed 3 years ago
/assign @squat
I would be happy to add test in separate PR 🤗
Maybe premature merge, but I think we can iterate @squat
Thanks @bwplotka Let me find time to add test for it.
This does not seem like the right way to go and in fact I think this is kind of confusing for the user. The Owner Reference should point to the receive controller, not the owner of the statefulset IMO. If the statefulset is deleted, then the controller should delete the generated configmap but the configmap definitely does not belong to the process that created the statefulset. It is literally created and thus owned by a different controller.
Sorry for pre mature merge than
@squat I agree with your point. the configmap is created by the receive controller. so the owner of configmap is the receive controller. Do we have another cases to have different owner for receive controller and statefulset? Do we need to watch the statefulset to delete the configmap if the sts is deleted?
yes exactly, we should delete configmaps when sts are deleted. we don't do that today but we absolutely should. that would be how we clean things up.
https://github.com/observatorium/operator/issues/10