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

Subresource event filter predicate

Open kleesc opened this issue 6 years ago • 1 comments

Add event filter for ManagedDatabase to ignore updates to subresources unless it's the ManagedDatabase's currentVersion, in which case we want to reconcile the next migration.

kleesc avatar Sep 17 '19 19:09 kleesc

I think we should invert the model and just filter out events for which the only thing that changed were things in the status subresource. As it stands right now you're going to filter out things that the user will expect to be able to change, and you're going to filter out reconciliations on downstream resources, e.g. jobs.

Updated to filter only on ManagedDatabases generation change. Other types will update when resourceVersion is changed. Doesn't look like Jobs were using the generation field anyways... So I'm guessing we can't just make the assumption that an update to the status of any object type will increment its generation.

kleesc avatar Oct 01 '19 14:10 kleesc