Skip to content

📝 docs(hive): document the hive-route-reader RBAC requirement - #6527

Open
clubanderson wants to merge 1 commit into
mainfrom
docs/hive-route-reader-rbac
Open

📝 docs(hive): document the hive-route-reader RBAC requirement#6527
clubanderson wants to merge 1 commit into
mainfrom
docs/hive-route-reader-rbac

Conversation

@clubanderson

Copy link
Copy Markdown
Contributor

Companion to kubestellar/hive#3849. Documents the namespace-scoped read-only hive-route-reader Role + RoleBinding added to the hosted-spoke provisioning template by kubestellar/hive#3846 (3aa8d8f7).

Where this went, and why

docs/content/hive/manual-provisioning.md — the only page in this repo that enumerates spoke-namespace RBAC, and the only place documenting spoke provisioning at all. It is a fork of v2/docs/manual-provisioning.md in kubestellar/hive and does not auto-sync, so it still described the pre-change object set. This is not an ambiguous placement: the page already lists the exact Roles and RoleBindings to apply, and that list was incomplete.

It is registered in nav at src/app/docs/page-map.ts:348 under Operations, which needs no change.

Note the two copies have intentionally diverged elsewhere — this one pins ghcr.io/kubestellar/hive:stable where upstream uses v2-latest, and upstream carries extra placeholder-app_id prose. I did a surgical RBAC-only insert rather than re-syncing the file, so those divergences are untouched.

Why it matters

Without the Role the spoke cannot read its own Route/Ingress, so it falls back to synthesising <hiveID>.<hub host>. That is correct only for spokes fronted by the hub's own wildcard domain, and a guaranteed 503 anywhere else — the wildcard resolves, so DNS looks healthy, but it hands the name to the hub's router, which has no backend for a hive on another cluster. This was a live user-visible outage on the vllm-d pool.

Strictly read-only and namespace-scoped, so a compromised spoke learns only its own hostname — which it already advertises — and can neither create nor retarget routing.

The subject is not uniform

The part most likely to be got wrong by hand. The template binds hive-sa on OpenShift (SCC) clusters and default elsewhere. Measured live, read-only:

Cluster Subject
hive-oke 22× default
vllm-d default and 41× hive-sa
a-ks-wec2 hive-sa

vllm-d alone needs both. The page now says to derive it from the hive Deployment rather than assume, and notes an empty serviceAccountName means default, not the empty string. Binding the wrong subject fails silently — the pod runs, the read is denied, you get the 503 fallback with no obvious error.

Changes

  • A.3 (new) — the automated path emits it. Recorded so nobody deletes it as unused.
  • B.2 — the Role + RoleBinding YAML, matching the page's existing inline-flow-mapping heredoc style; the rationale; the security argument.
  • Fixed an existing error — the object inventory said "two Roles ... three RoleBindings". Now three and four.
  • Gotchas for ServiceAccount derivation and for the retroactive apply.
  • Failure-mode table: the 503 dashboard-link row.

Existing namespaces provisioned before this change need it applied retroactively (in progress across the fleet). New provisions get it automatically.

Verification

Read the template and SpokeServedHost in the hive repo rather than working from a summary; the code matched. Live state confirmed read-only — no cluster writes.

The hosted-spoke provisioning template in kubestellar/hive gained a
namespace-scoped read-only hive-route-reader Role + RoleBinding (hive#3846).
This page is a fork of that repo's v2/docs/manual-provisioning.md and does not
auto-sync, so it still described the pre-change object set.

Without the Role the spoke cannot read its own Route/Ingress, so it falls back
to synthesising "<hiveID>.<hub host>" — correct only for spokes fronted by the
hub's own wildcard domain, and a guaranteed 503 anywhere else, because the
wildcard hands the name to the HUB's router, which has no backend for a hive
on another cluster. DNS resolves, so it looks healthy. Live outage on vllm-d.

- A.3: the automated path emits it, so it is not deleted as unused.
- B.2: the Role + RoleBinding YAML in the existing inline-flow-mapping style,
  the rationale, and the read-only / namespace-scoped security argument.
- Fix the object inventory, which said "two Roles ... three RoleBindings".
- Gotcha: derive the ServiceAccount from the hive Deployment. The subject is
  NOT uniform — SCC spokes bind hive-sa, others bind default. Measured live:
  hive-oke 22x default; vllm-d 2x default + 41x hive-sa; a-ks-wec2 5x hive-sa.
  An empty serviceAccountName means "default", not the empty string.
- Gotcha: pre-existing namespaces need it retroactively; new ones get it free.
- Failure-mode table: the 503 dashboard-link row.

Surgical RBAC-only insert. The two copies have intentionally diverged
elsewhere (image tag, placeholder app_id prose) and those are left alone.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 14:22
@clubanderson
clubanderson requested a review from KPRoche as a code owner August 14, 2026 14:22
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Aug 14, 2026
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellar-docs ready!

Name Link
🔨 Latest commit 5cb33b7
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/6a7f24b2fd7c3e00083482a1
😎 Deploy Preview https://deploy-preview-6527--kubestellar-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kproche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 14, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Preview Links

The following documentation pages were changed in this PR:

Status Page Preview Link
📝 modified manual-provisioning View preview

🔗 Full preview site

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Hive manual provisioning documentation to include and justify the new namespace-scoped read-only hive-route-reader Role/RoleBinding required for spokes to discover and report their served Route/Ingress hostname (preventing incorrect dashboard links and branded 503s).

Changes:

  • Adds an “A.3” section explaining that the provisioning template emits hive-route-reader, why it’s required, and when retrofits are needed.
  • Updates the manual provisioning RBAC inventory and includes the hive-route-reader Role + RoleBinding YAML plus operational gotchas.
  • Extends the failure-mode reference with a 503/dashboard-link symptom tied to missing hive-route-reader RBAC.
Suppressed comments (1)

docs/content/hive/manual-provisioning.md:754

  • This failure-mode row says the hub falls back, but in the detailed section below the spoke is described as performing the fallback when it can't read Route/Ingress. Make the wording consistent so operators know where to look when debugging.
| Hive online, but **My Hives → Dashboard** returns a branded **503**; the link reads `<hive-id>.<hub-host>` instead of the spoke cluster's own domain | Missing `hive-route-reader` RBAC, so the spoke can't read its own Route/Ingress and the hub falls back to the hub-wildcard host, which has no backend for a hive on another cluster | Apply the `hive-route-reader` Role + RoleBinding, binding the SA the hive Deployment actually uses (see [B.2](#hive-route-reader--why-the-dashboard-link-503s-without-it)), then `rollout restart deploy/hive` |

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


It is **not** unused. The spoke reads its own Route/Ingress through it to learn
the hostname it actually serves, and reports that to the hub as `dashboard_url`.
Remove it and the hub falls back to synthesising `<hiveID>.<hub host>`, which
Comment on lines +263 to +264
#### `hive-route-reader` — why the dashboard link 503s without it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. documentation Improvements or additions to documentation size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants