fix(controller): watch Connection to clear stale TemporalConnection status - #545
Conversation
…tatus DeprecatedTCReconciler only watched TemporalConnection. It decides its status by looking up whether a same-named Connection exists, but nothing outside the reconciler ever writes to a TemporalConnection, so creating the Connection did not enqueue it and the status stayed stale — still telling users to create a Connection that already existed. Watch Connection so the replacement enqueues the deprecated resource. Names are 1:1, so EnqueueRequestForObject maps it directly. No RBAC change is needed: the reconciler already declares get;list;watch on connections. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
Hey @htonkovac, thanks for issuing this PR. We'll get to this shortly. In the meantime is there an open issue that is associated with this PR? |
|
hey @tomba7, sorry, I haven't opened an issue for this. I simply encountered this while upgrading my companies installation of the controller. |
No worries at all, @htonkovac! We can create a tracking issue for it, no problem :) |
|
@htonkovac all done! #548 |
jaypipes
left a comment
There was a problem hiding this comment.
👍 thank you @htonkovac, appreciated!
While migrating our clusters across the 0.26.0 CRD rename, our deprecated
TemporalConnectionobjects got stuck reportingreason=Deprecated— still asking us to create aConnectionthat already existed. Unsticking them meant a meaningless annotation to force areconcile:
All of them flipped to
MigratedToConnectionwithin about twenty seconds, so the status logic isright — only the trigger was missing.
DeprecatedTCReconcilerwatched just its own kind, andnothing outside that reconciler ever writes to a
TemporalConnection, so creating theConnectionnever enqueued it.
This PR adds a watch on
Connectionso the replacement enqueues the deprecated resource. Names are1:1, so
EnqueueRequestForObjectmaps it directly, and no RBAC change is needed — the reconcileralready declares
get;list;watchon connections.DeprecatedTWDReconcilerhas the same missing watch but does not need it in practice:migrateFromDeprecatedTWDpatches themigrated-to-wdlabel onto the deprecated object, and thatwrite wakes the reconciler. Connections have no equivalent write, so they need the nudge.