fix(installer): point kubeconfig at the client namespace after deploy#208
Merged
Merged
Conversation
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>
Contributor
Author
|
👋 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
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Right after a successful install, the first CLI command errors:
The installer deploys the client into the
traceblocnamespace, but the k3d kubeconfig context stays ondefault— so the CLI (and plainkubectl) look in the wrong namespace. The documented next step,tracebloc dataset push ./data, hits the same error.Fix
After
helm upgrade --install, set the current context's namespace to$TB_NAMESPACE(best-effort, honorsTB_NAMESPACEoverrides). Nowkubectland the tracebloc CLI default to the client's namespace — no-n/--namespaceneeded. Mirrored ininstall-k8s.ps1; new bats test asserts theset-contextcall.Follow-up (separate PR,
clirepo)Make the CLI auto-discover the client's namespace (scan for
*-jobs-manager) so it's robust when the context isn't set or the client lives in a custom namespace.Targets
develop. Local bats: the new test passes; the one unrelated failure (_extract_yaml_valuesingle-quote) is the known macOS bash-3.2 quirk that also fails on pristine develop — CI (bash 5) passes it. PowerShell mirror per the usual Windows-reviewer check.