Prioritizing Recent Messages with Go Channels

🫧 Open on Bubbles I was writing a controller that watches Kubernetes HPAs and Istio VirtualServices for changes and coordinates between the two. Both watchers feed updates into the same reconciliation loop, and the loop needs to act on whatever the current state is, not replay a backlog of intermediate states it missed while it was busy reconciling. I had the watchers sending over Go channels and the reconciler was falling behind, processing stale HPA specs while a newer one was already queued up behind it.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论