Open joelanford opened 7 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).
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
/assign
/unassign
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.