Skip to content

fix(node-servant): add system:nodes group to yurt-hub-multiplexer ClusterRoleBinding - #2729

Open
Pragnasri-363 wants to merge 1 commit into
openyurtio:masterfrom
Pragnasri-363:fix/yurthub-multiplexer-rbac
Open

fix(node-servant): add system:nodes group to yurt-hub-multiplexer ClusterRoleBinding#2729
Pragnasri-363 wants to merge 1 commit into
openyurtio:masterfrom
Pragnasri-363:fix/yurthub-multiplexer-rbac

Conversation

@Pragnasri-363

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes node-servant conversion failing with "context deadline exceeded" during label-driven edge node conversion. Root cause: YurtHub authenticates as system:node:<name>, but the yurt-hub-multiplexer ClusterRole is bound only to the openyurt:multiplexer group. Since node identities are never added to this group, YurtHub is being denied access to ConfigMaps and NodePool resources it needs at startup, causing it to never reach a ready state, node-servant then times out waiting for YurtHub's readiness signal.

This PR adds the system:nodes group (which all node identities automatically belong to) to the yurt-hub-multiplexer-binding ClusterRoleBinding as part of the conversion process. This is done once, idempotently, covering all current and future nodes — rather than adding individual per-node entries, which would grow unboundedly at scale.

Which issue(s) this PR fixes:

Fixes #2716

Special notes for your reviewer:

This adds a system:nodes Group subject rather than per-node User entries, to avoid the ClusterRoleBinding's subject list growing unboundedly as nodes are converted. Uses retry.RetryOnConflict to handle concurrent conversions safely.

Does this PR introduce a user-facing change?

Fixed node-servant conversion failing with "context deadline exceeded" due to missing RBAC permissions for YurtHub during edge node conversion.

other Note

@Pragnasri-363
Pragnasri-363 requested a review from a team as a code owner August 4, 2026 05:38
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@Pragnasri-363

Copy link
Copy Markdown
Author

Following up on my own PR: I tested this fix directly against a live cluster (manually applying the ClusterRoleBinding change) and confirmed it does not actually resolve the issue ,check my updated comment on #2716 for the full explanation.

Root cause is deeper than RBAC: Kubernetes' NodeRestriction admission controller blocks list/watch for node identities on ConfigMaps regardless of ClusterRoleBinding contents.I'll look into whether YurtHub can use a different identity for these specific calls, or update this PR with a different approach.Would like to take your advice @luckymrwang before proceeding further on this.

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.

[BUG] Failure of node-servant-conversion with "context deadline exceeded"

1 participant