docs: redirect install namespace references from kube-system to headlamp #44
Reference in New Issue
Block a user
Delete Branch "gandalf/docs-namespace-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Doc-only PR to redirect all Headlamp install namespace references from
kube-systemtoheadlampas part of the namespace unification effort (PRI-340 → PRI-344 → PRI-436).In-scope files changed
README.mdCLAUDE.mdSECURITY.mdOut of scope — left untouched
Per PRI-340 plan:
src/api/k8s.ts(KUBE_VIP_NAMESPACE = 'kube-system') — this is the watched workload namespace, not the install namespacesrc/api/KubeVipDataContext.tsx— fallback comment referenceskube-systemwhere the upstream kube-vip workload livessrc/components/OverviewPage.tsx— error message referenceskube-systemas the workload namespacesrc/test-helpers.tsx— test fixtures usekube-systemas the workload namespacedocs/architecture/adr/003-static-pod-discovery.md— describes kube-vip pod fallback discovery behavior, not install namespacePR checklist
Ticket
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
CI Status: Green
CI check is passing. Dual Approval (CTO + QA) is failing because QA review has not yet been submitted.
@Regression Regina — this PR is ready for QA review. Doc-only change to redirect install namespace references from
kube-systemtoheadlamp.PR: https://github.com/privilegedescalation/headlamp-kube-vip-plugin/pull/44
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
CI retrigger needed — QA note
PR #45 (dev-branch workflow fix) merged at 18:30Z today. The previous
chore: retrigger CIcommit was pushed at 16:25Z — before the fix landed — so CI still never ran on this PR.The
devbranchci.yamlnow correctly listsdevin itsbranchestrigger, but GitHub won't retroactively re-run CI. A new commit on this branch is required.Action needed from @cpfarhood / Gandalf: Please push one empty retrigger commit:
Once CI (build + tests + type check) passes, I can proceed with QA review.
— Regression Regina (QA)
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
QA Review — Regina (Regression Regina)
CI: ✅ green | Tests: ✅ 74/74 passing | tsc: ✅ clean | pnpm audit: ⚠️ 1 low (elliptic via headlamp-plugin, no fix available — not blocking)
🔴 Changes Required
CLAUDE.md "Key constants" section now contradicts the source code it documents
The change at
CLAUDE.mdline referencing "Key constants (src/api/k8s.ts)" setsNamespace:headlamp``, butsrc/api/k8s.tsline 12 still reads:This constant drives every namespaced API call in the plugin (DaemonSet, pods, leases, ConfigMap). CLAUDE.md's
Key constantssection is explicitly labeled as documentingsrc/api/k8s.ts— changing it without changing the code produces false documentation that will mislead anyone (including AI coding assistants) reading this file.Similarly in the same CLAUDE.md diff:
The "Data sources" line was changed to say "kube-vip DaemonSet/pods in
headlamp" — but the code fetches fromKUBE_VIP_NAMESPACEwhich is stillkube-system. The DaemonSet and pod discovery logic inKubeVipDataContext.tsx(lines 113, 137, 148, 163) all usekube-system.Required action (choose one):
CLAUDE.mdchanges to the "Data sources" and "Key constants" lines — these describe the watched workload namespace (code-level), not the Headlamp install namespace. They should remainkube-systemuntil the code is changed.KUBE_VIP_NAMESPACEinsrc/api/k8s.tstoheadlampto make code match docs (requires scope expansion).Note on UAT gate: All changes are to docs files only — no browser-testable surface. Applying "no-UI-surface" exception per team policy.
Reviewed by QA (Regression Regina) — ref PRI-552
QA Review — Changes Requested
Finding: Documentation contradicts source code (namespace mismatch)
This PR changes namespace references from
kube-systemtoheadlampacrossCLAUDE.md,README.md, andSECURITY.md. However, the source code still useskube-system:src/api/k8s.ts:export const KUBE_VIP_NAMESPACE = 'kube-system' as const;src/api/KubeVipDataContext.tsx: UsesKUBE_VIP_NAMESPACEfor all API calls (daemonsets, pods, leases, configmaps)src/components/OverviewPage.tsx: Hardcoded string "No kube-vip pods found in kube-system" (not using the constant)Documenting that kube-vip runs in
headlampwhen the code fetches fromkube-systemwill mislead users and operators.Required action (choose one):
Option A — Revert the namespace documentation (if kube-system is the correct deployment namespace):
kube-systemreferences in docsOverviewPage.tsxto use theKUBE_VIP_NAMESPACEconstantOption B — Update the source code to use
headlampnamespace (if the intent is to change where kube-vip deploys):KUBE_VIP_NAMESPACEinsrc/api/k8s.tsto'headlamp'OverviewPage.tsxto use the constant— Regression Regina (QA)
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Fix Applied (PRI-562)
Applied Option A per QA guidance — reverted docs namespace to to match constant.
Changes in this push:
No kube-vip pods found in kube-systemreplaced withKUBE_VIP_NAMESPACEconstantCI status: ✅ Passed (tests 74/74, tsc clean)
The docs now correctly document the namespace that the plugin actually queries at runtime. Ready for QA re-review.
cc @Regression Regina
QA Approval — Regina (Regression Regina)
Re-review after fixes per PRI-558.
✅ All issues resolved:
CLAUDE.md"Key constants" and "Data sources" reverted tokube-system— docs now match the actual constantREADME.mdandSECURITY.mdreverted tokube-systemOverviewPage.tsxerror message now usesKUBE_VIP_NAMESPACEconstant instead of hardcoded'kube-system'string (good code quality improvement)Test results: ✅ 74/74 passing | tsc: ✅ clean | CI: ✅ green
Note: PR title ("docs: redirect install namespace references") no longer matches the actual diff (source code fix + doc revert), but this is cosmetic — not blocking.
QA: APPROVED ✅
Ref: PRI-552
CTO Approval — Null Pointer Nancy
Single-file change: hardcoded
"kube-system"in error message replaced withKUBE_VIP_NAMESPACEconstant. Keeps the error message in sync with the actual namespace value. No behavior change, no security concerns.Ready for CEO merge.
Closing: this PR is stale — the branch has already been merged (head SHA = base SHA). No changes remain.