fix(docs): add explicit kube context step before control-plane helmfile sync#252
fix(docs): add explicit kube context step before control-plane helmfile sync#252pdmack wants to merge 1 commit into
Conversation
…le sync Step 5 of the Helmfile installation guide told the user to "set kubectl context to your cluster" without giving a concrete command or specifying the control-plane context. In a multi-cluster setup a bare helmfile sync targets the current context, which may be the wrong cluster. Replace the one-liner with an explicit kubectl config use-context command and a verification step. Applied to both docs/user/ (top-of-tree) and docs/v0.6.0/ (frozen release docs). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughStep 5 in both Helmfile installation guides now instructs operators to select the control-plane kubectl context and verify it before deploying control-plane components. ChangesHelmfile installation documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/user/helmfile-installation.md`:
- Around line 761-768: The context check currently occurs after cluster-mutating
setup commands. In docs/user/helmfile-installation.md lines 761-768 and
docs/v0.6.0/helmfile-installation.md lines 761-768, move the kubectl config
use-context and current-context commands before Step 4’s namespace and
registry-secret commands, preserving the same ordering in both guides.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 62ffa38d-e11a-49d2-84da-bbb4d44d992f
📒 Files selected for processing (2)
docs/user/helmfile-installation.mddocs/v0.6.0/helmfile-installation.md
| Set kubectl to the control-plane cluster context before deploying. In a | ||
| multi-cluster setup, a bare `helmfile sync` targets whatever context is | ||
| currently active, so verify the context is correct before proceeding. | ||
|
|
||
| ```bash | ||
| kubectl config use-context <control-plane-context> | ||
| kubectl config current-context | ||
| ``` |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
The context check must precede all cluster-mutating setup commands.
Selecting the context in Step 5 protects helmfile sync, but Step 4 already creates namespaces and registry secrets using the ambient context. Move context selection before Step 4, or gate those commands explicitly.
docs/user/helmfile-installation.md#L761-L768: move the context setup before Step 4'skubectlcommands.docs/v0.6.0/helmfile-installation.md#L761-L768: apply the same ordering fix in the frozen guide.
📍 Affects 2 files
docs/user/helmfile-installation.md#L761-L768(this comment)docs/v0.6.0/helmfile-installation.md#L761-L768
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/user/helmfile-installation.md` around lines 761 - 768, The context check
currently occurs after cluster-mutating setup commands. In
docs/user/helmfile-installation.md lines 761-768 and
docs/v0.6.0/helmfile-installation.md lines 761-768, move the kubectl config
use-context and current-context commands before Step 4’s namespace and
registry-secret commands, preserving the same ordering in both guides.
There was a problem hiding this comment.
Good catch. Step 4's namespace and secret creation commands also target the ambient context. Moving the context selection before Step 4 is the right longer-term fix, but this PR is scoped to the specific bug report (Step 5 helmfile sync). I'll add context selection before Step 4 as a follow-up if the reviewer agrees.
There was a problem hiding this comment.
@pdmack, agreed. The current PR correctly addresses the reported Step 5 helmfile sync risk, and moving context selection before Step 4 is a valid but broader follow-up. I will not block this PR on that change.
Would you like me to open a follow-up GitHub issue for the Step 4 context ordering update in both guides?
✏️ Learnings added
Learnt from: pdmack
Repo: NVIDIA/nvcf PR: 252
File: docs/user/helmfile-installation.md:761-768
Timestamp: 2026-07-18T20:56:18.708Z
Learning: In `docs/user/helmfile-installation.md` and `docs/v0.6.0/helmfile-installation.md`, Step 4 creates namespaces and image-pull secrets with ambient-context `kubectl` commands. Context selection should ultimately occur before Step 4, but pull request `#252` is deliberately scoped to Issue `#251`'s Step 5 `helmfile sync` context-selection fix.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
There was a problem hiding this comment.
@pdmack 🤖 's right. kube context selection should happen much ahead of namespace & secret creation
|
The Fern Check / Check links failure is pre-existing on main -- 18 broken file links in docs we did not touch (local-development, ngc-managed/cluster-management, user/observability, v0.6.0/observability). Our change adds no new broken links. |
|
@pdmack You mention me in the “For the Reviewer” section. But since I have nothing to do with this project, I strongly suspect that you've confused me with someone else. |
TL;DR
helmfile syncsilently targets the wrong cluster.kubectl config use-contextcommand and a context verification step.Additional Details
docs/user/helmfile-installation.md(top-of-tree) anddocs/v0.6.0/helmfile-installation.md(frozen v0.6.0 release docs).--kubeconfigflags and are not affected.For the Reviewer
@sbaum -- please confirm we want this in both doc streams.
For QA
Docs-only change. No QA needed.
Issues
Fixes #251
Checklist
Summary by CodeRabbit
kubectlcontext.