Conversation
When BiosSettings cr is removed a ServerMaintenance cr should also be removed. Currently it is handled by owner reference but this solution doesn't work because BiosSettings is a cluster scoped resource and ServerMaintenance is namespaced resource. This commit introduces deleting ServerMaintenance when BiosSettings is deleted in a reconcile function. It also changes owning to watching of ServerMaintenance by BiosSettings controller.
|
Could you add/adjust a test to check that the explicit deletion is working? |
I see, but does it impact this PR? Here I delete |
This diff will not affect the other diffs, but I am afraid that this might introduce issues. current behavior is not like that. In Failed state, the maintenance is not removed, so if I delete the BiosSettings, the server is still in Maintenance and that will give a chance to fix or revert the changes before moving the server out of maintenance (or maybe create new BIOSSettings with same maintenance Ref to fix the server). |
|
As discussed with @nagadeesh-nagaraja we don't need to take care of deleting |
When BiosSettings cr is removed a ServerMaintenance cr should also be removed. Currently it is handled by owner reference but this solution doesn't work because BiosSettings is a cluster scoped resource and ServerMaintenance is namespaced resource. This commit introduces deleting ServerMaintenance when BiosSettings is deleted in a reconcile function. It also changes owning to watching of ServerMaintenance by BiosSettings controller.
Proposed Changes
Fixes #