-
When writing a fairly standard controller that watches a stream of
In this case my custom resource is type What I observe is that the Some open questions:
Thanks in advance for your time / help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
some small answers, i don't know exactly what's going on here.
if that's the case, then that would be a pretty big footgun in predicates. i've never seen objects missing data population like this, but I've not particularly looked for it either. if you have an environment to test, a
This part makes sense. The new controller will not have anything built up in its temporary memory predicate cache so every new event flows through unfiltered once.
Without a filter, that would indeed be weird if your reconciler is writing non deterministic updates to the status object - as that should indeed re-trigger. It's a normal |
Beta Was this translation helpful? Give feedback.
@ivan-kiselev identified our root issue.
The first time a new object is seen, it does not have a finalizer set. Therefore the code will attempt to
patch
the object andawait_change
. Patching the object does not increment the object'sgeneration
so our predicate filter then prevents the object from triggering the controller. This is because the initial trigger caused generation = 1 to already be seen.Restarting the controller instance fixed the problem by presenting a new store to cache.
The solution implemented was to write a custom predicate filter on
K
that inputs the hash of thegeneration
(if present) and then adds in the hash of the finalizers: