operator-controller icon indicating copy to clipboard operation
operator-controller copied to clipboard

[epic] Support orphan deletion policy

Open joelanford opened this issue 1 year ago • 6 comments

joelanford avatar Apr 22 '24 16:04 joelanford

A quick clarification and probably an implementation detail too - Once the clusterextension/extension is deleted and the respective objects are left behind, we need to remove watches on them so that we don't end up spending reconciles for events triggered from those objects, though modifying orphaned objects independently could be rare scenario and is discouraged. A very simple implementation I can think of is predicate based filtering based on a label.

varshaprasad96 avatar Apr 24 '24 17:04 varshaprasad96

Once the clusterextension/extension is deleted and the respective objects are left behind, we need to remove watches on them so that we don't end up spending reconciles for events triggered from those objects

Agreed!

A very simple implementation I can think of is predicate based filtering based on a label.

Yes, and I think rukpak already does that. It uses a dependentSelector to set up the watches. When we orphan those objects, we just need to make sure to remove the labels that are selected by that predicate (or the equivalent predicate we eventually add to operator-controller).

joelanford avatar Apr 25 '24 14:04 joelanford

Just adding links to some resources, so that we don't lose track and can revisit later: Pre/post delete hooks: https://helm.sh/docs/topics/charts_hooks/#the-available-hooks Orphan release resources: https://helm.sh/docs/howto/charts_tips_and_tricks/#tell-helm-not-to-uninstall-a-resource

varshaprasad96 avatar May 01 '24 17:05 varshaprasad96

/assign

yashoza19 avatar May 13 '24 14:05 yashoza19

/unassign

yashoza19 avatar Jun 20 '24 13:06 yashoza19