Skip to content

fix(planner): exclude control-plane Nodes from worker routing - #10

Merged
zijiren233 merged 1 commit into
labring-sigs:mainfrom
zijiren233:fix/skip-control-plane-nodes
Oct 27, 2026
Merged

zijiren233 merged 1 commit into
labring-sigs:mainfrom
zijiren233:fix/skip-control-plane-nodes

Conversation

@zijiren233

Copy link
Copy Markdown
Collaborator

Problem

planner.Workers() builds the worker universe from CiliumNodes, and validateWorker had no control-plane check — the isControlPlane() 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

  • validateWorker marks Nodes carrying node-role.kubernetes.io/control-plane (or the legacy node-role.kubernetes.io/master label) with a new control-plane worker state, right after the Node-missing/deleting checks and before readiness gates.
  • Such workers keep APIReady=false, so PodRoutes and ServiceRoute exclude them automatically; /status shows the new state for visibility.
  • Added TestPlannerSkipsControlPlaneNodes covering 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

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.
@zijiren233
zijiren233 merged commit f5d9f6d into labring-sigs:main Oct 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant