You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently internal trigger functions (watches, owns, etc..) cannot reconcile parent reference when resource is removed or reference inside resource is modified/removed.
Because of this managing Custom Resources like Service that rely on selectors is much harder.
where new implementation trigger_with (trigger_with_stateful) would create new Mapper stream that would contain state.
State would have some kind of HashMap that would keep previously produced ObjectReferences from mapper function. If cached ObjectReference is not included in new mapper result, it would still produce ReconcileRequest and it would be removed from cache.
And potentially new ReconcileReason could be added ObjectRelationRemoved { obj_ref: Box<ObjectRef<DynamicObject>> }
Describe alternatives you've considered
Alternative of creating _stateful variant of functions would be to add new parameter to watcher::Config that would enable relation caching.
Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered:
JPaja
changed the title
Stateful trigger_others
Stateful triggers
Jan 26, 2025
Would you like to work on this feature?
yes
What problem are you trying to solve?
Currently internal trigger functions (watches, owns, etc..) cannot reconcile parent reference when resource is removed or reference inside resource is modified/removed.
Because of this managing Custom Resources like
Service
that rely on selectors is much harder.Describe the solution you'd like
create
*_stateful' variant of internal trigger functions (
trigger_with,
trigger_others,
trigger_others_shared,
trigger_owners,
trigger_owners_shared`)where new implementation
trigger_with
(trigger_with_stateful
) would create newMapper
stream that would contain state.State would have some kind of HashMap that would keep previously produced
ObjectReferences
frommapper
function. If cachedObjectReference
is not included in newmapper
result, it would still produceReconcileRequest
and it would be removed from cache.And potentially new
ReconcileReason
could be addedObjectRelationRemoved { obj_ref: Box<ObjectRef<DynamicObject>> }
Describe alternatives you've considered
Alternative of creating _stateful variant of functions would be to add new parameter to
watcher::Config
that would enable relation caching.Documentation, Adoption, Migration Strategy
No response
Target crate for feature
kube-runtime
The text was updated successfully, but these errors were encountered: