Skip to content

Prod: Set kubeconfig context namespace after Helm install for tracebloc #209

Merged
saadqbal merged 2 commits into
mainfrom
develop
Jun 5, 2026
Merged

Prod: Set kubeconfig context namespace after Helm install for tracebloc #209
saadqbal merged 2 commits into
mainfrom
develop

Conversation

@saadqbal

@saadqbal saadqbal commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Related

Type of change

  • Feature
  • Bug fix
  • Tech-debt / refactor
  • Docs
  • Security / hardening
  • Breaking change

Test plan

Screenshots / recordings

Deployment notes

Checklist

  • Tests added / updated and passing locally
  • Docs updated if behavior or config changed
  • No secrets / credentials in the diff
  • For security-sensitive paths: appropriate reviewer requested

Note

Low Risk
Installer-only, best-effort kubeconfig tweak with tests; no runtime auth or cluster logic changes.

Overview
After a successful Helm client install, both installers now run kubectl config set-context --current --namespace for the client namespace (default tracebloc, or TB_NAMESPACE). kubectl and the tracebloc CLI can use that namespace without -n / --namespace.

The step is best-effort: on bash it uses || true; on Windows stderr is suppressed so a failed context update does not undo a successful install.

A new BATS test asserts the bash path invokes kubectl config set-context --current --namespace tracebloc during install_client_helm.

Reviewed by Cursor Bugbot for commit 5f42156. Bugbot is set up for automated code reviews on this repo. Configure here.

LukasWodka and others added 2 commits June 5, 2026 13:30
After `helm upgrade --install` into the fixed `tracebloc` namespace, set the
current kubeconfig context's namespace to it — so `kubectl` and the tracebloc
CLI (`cluster info` / `dataset push`) default to the right namespace with no
-n / --namespace flag.

Without this the context stayed on `default`, so the first post-install CLI
command errored: "no tracebloc parent client release found in namespace
default". The documented next step (`tracebloc dataset push ./data`) hit it too.

- Best-effort (`|| true`) so it never aborts an otherwise-successful install.
- Honors TB_NAMESPACE overrides (uses the var, not a hardcoded name).
- Mirrored in install-k8s.ps1.
- New bats test asserts the set-context call with the namespace.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-install

fix(installer): point kubeconfig at the client namespace after deploy
@saadqbal saadqbal self-assigned this Jun 5, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 18 / 8

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@saadqbal saadqbal merged commit 9e86836 into main Jun 5, 2026
44 of 45 checks passed
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.

3 participants