operator-framework / operator-controller

A new and improved management framework for extending Kubernetes with Operators
https://operator-framework.github.io/operator-controller/
Apache License 2.0
73 stars 54 forks source link

[epic] Support orphan deletion policy #775

Open joelanford opened 7 months ago

varshaprasad96 commented 6 months ago

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.

joelanford commented 6 months ago

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).

varshaprasad96 commented 6 months ago

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

yashoza19 commented 6 months ago

/assign

yashoza19 commented 5 months ago

/unassign