Repository navigation
fix(planner): exclude control-plane Nodes from worker routing - #10
Merged
zijiren233 merged 1 commit intoOct 27, 2026
Merged
Conversation
A lingering control-plane Node with an assigned CiliumNode pool passed every worker gate and was programmed as an ECMP next hop. validateWorker now marks such Nodes with a dedicated control-plane state before the readiness checks, keeping registered masters out of Pod CIDR and Service CIDR routes while startup discovery already excluded them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
planner.Workers()builds the worker universe from CiliumNodes, andvalidateWorkerhad no control-plane check — theisControlPlane()skip only existed in the startup discovery path (resolver.workerIPs). A registered control-plane Node that still has a CiliumNode with an allocated Pod CIDR pool, a Ready cilium agent and a passing health probe passes every gate and gets programmed as a Pod CIDR / Service CIDR ECMP next hop.This was observed in practice during a registered→standalone conversion that left one master Node object behind: the other masters received a
<pool>/24 via <master-IP>route until the Node object was deleted.Change
validateWorkermarks Nodes carryingnode-role.kubernetes.io/control-plane(or the legacynode-role.kubernetes.io/masterlabel) with a newcontrol-planeworker state, right after the Node-missing/deleting checks and before readiness gates.APIReady=false, soPodRoutesandServiceRouteexclude them automatically;/statusshows the new state for visibility.TestPlannerSkipsControlPlaneNodescovering both the current and legacy role labels, asserting no Pod CIDR routes and no Service route are produced.Signed-off-by: zijiren233 pyh1670605849@gmail.com