Skip to content

fix(docs): add explicit kube context step before control-plane helmfile sync#252

Open
pdmack wants to merge 1 commit into
NVIDIA:mainfrom
pdmack:fix/helmfile-kube-context-step5
Open

fix(docs): add explicit kube context step before control-plane helmfile sync#252
pdmack wants to merge 1 commit into
NVIDIA:mainfrom
pdmack:fix/helmfile-kube-context-step5

Conversation

@pdmack

@pdmack pdmack commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

TL;DR

  • Step 5 of the Helmfile installation guide says "set kubectl context to your cluster" with no concrete command or control-plane specificity. In a multi-cluster setup, helmfile sync silently targets the wrong cluster.
  • Adds an explicit kubectl config use-context command and a context verification step.

Additional Details

  • Applied to both docs/user/helmfile-installation.md (top-of-tree) and docs/v0.6.0/helmfile-installation.md (frozen v0.6.0 release docs).
  • Steps 7 and 8 (compute-plane) already use explicit --kubeconfig flags 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

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Documentation
    • Clarified how to select the control-plane Kubernetes cluster before deployment.
    • Added commands to switch and verify the active kubectl context.
    • Included guidance for multi-cluster environments to ensure deployment targets the intended cluster.

…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>
@pdmack
pdmack requested a review from a team as a code owner July 18, 2026 20:48
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Step 5 in both Helmfile installation guides now instructs operators to select the control-plane kubectl context and verify it before deploying control-plane components.

Changes

Helmfile installation documentation

Layer / File(s) Summary
Add control-plane context setup instructions
docs/user/helmfile-installation.md, docs/v0.6.0/helmfile-installation.md
Step 5 adds multi-cluster guidance and explicit kubectl config use-context and kubectl config current-context commands before running Helmfile deployment commands.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main documentation change.
Linked Issues check ✅ Passed The updated Helmfile guides add explicit control-plane context selection and verification in both docs as requested by issue #251.
Out of Scope Changes check ✅ Passed The changes stay within the documented Helmfile Step 5 fix and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c79102d and b899cd3.

📒 Files selected for processing (2)
  • docs/user/helmfile-installation.md
  • docs/v0.6.0/helmfile-installation.md

Comment on lines +761 to +768
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
```

@coderabbitai coderabbitai Bot Jul 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ 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's kubectl commands.
  • 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@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.

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.

@pdmack 🤖 's right. kube context selection should happen much ahead of namespace & secret creation

@pdmack

pdmack commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

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.

@sbaum

sbaum commented Jul 19, 2026

Copy link
Copy Markdown

@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.

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.

Helmfile installation Step 5 does not select control-plane kube context

3 participants