fix(kube): switch to --kubeconfig flag, add Test Connection diagnostic, fix SelectValue label #82

Merged
sarman merged 2 commits from fix/kube-select-label-and-context into master 2026-06-08 01:50:25 +00:00
Owner

Changes

--kubeconfig flag (was: KUBECONFIG env var)

All 40 kubectl invocations now pass --kubeconfig <path> as an explicit CLI flag instead of setting the KUBECONFIG environment variable. The flag takes highest precedence in kubectl's lookup order and is unambiguous regardless of any inherited env vars from the parent process.

current-context fix (carried over from previous PR)

extract_context() and upload_kubeconfig() now read the current-context field from the YAML instead of always picking contexts[0]. Re-upload your kubeconfig after deploying.

SelectValue label display fix (carried over)

SelectValue now resolves the display label from a value → children map built at render time, so the cluster dropdown shows the friendly name instead of the UUID.

Test Connection diagnostic

New test_kubectl_connection Tauri command runs kubectl cluster-info with the stored kubeconfig and returns: context name, kubectl binary path, exit code, full stdout and stderr. A Test button in Settings → Kubeconfig triggers it — the output will show exactly what kubectl sees (wrong context, expired certs, missing exec plugin, etc.) without needing to inspect tracing logs.

Test plan

  • Deploy and re-upload kubeconfig (required for current-context fix to take effect)
  • Click Test in Settings → Kubeconfig — output should show cluster info or a clear error
  • Navigate to Kubernetes section — resources should load
  • Cluster dropdown shows friendly name, not UUID
  • All checks: npm run test:run 268 pass, cargo test 343 pass, zero lint/type errors
## Changes ### --kubeconfig flag (was: KUBECONFIG env var) All 40 kubectl invocations now pass `--kubeconfig <path>` as an explicit CLI flag instead of setting the `KUBECONFIG` environment variable. The flag takes highest precedence in kubectl's lookup order and is unambiguous regardless of any inherited env vars from the parent process. ### current-context fix (carried over from previous PR) `extract_context()` and `upload_kubeconfig()` now read the `current-context` field from the YAML instead of always picking `contexts[0]`. Re-upload your kubeconfig after deploying. ### SelectValue label display fix (carried over) `SelectValue` now resolves the display label from a `value → children` map built at render time, so the cluster dropdown shows the friendly name instead of the UUID. ### Test Connection diagnostic New `test_kubectl_connection` Tauri command runs `kubectl cluster-info` with the stored kubeconfig and returns: context name, kubectl binary path, exit code, full stdout and stderr. A **Test** button in Settings → Kubeconfig triggers it — the output will show exactly what kubectl sees (wrong context, expired certs, missing exec plugin, etc.) without needing to inspect tracing logs. ## Test plan - [ ] Deploy and re-upload kubeconfig (required for current-context fix to take effect) - [ ] Click **Test** in Settings → Kubeconfig — output should show cluster info or a clear error - [ ] Navigate to Kubernetes section — resources should load - [ ] Cluster dropdown shows friendly name, not UUID - [ ] All checks: `npm run test:run` 268 pass, `cargo test` 343 pass, zero lint/type errors
sarman added 1 commit 2026-06-08 01:32:14 +00:00
fix(kube): switch to --kubeconfig flag; add Test Connection diagnostic
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 1m37s
Test / frontend-tests (pull_request) Successful in 1m39s
Test / rust-fmt-check (pull_request) Successful in 10m45s
Test / rust-clippy (pull_request) Successful in 12m27s
Test / rust-tests (pull_request) Successful in 14m43s
48292e959e
Credential error persists: switch all 40 kubectl invocations from using
KUBECONFIG env var to the explicit --kubeconfig CLI flag. The flag has higher
precedence in kubectl's lookup order and is unambiguous regardless of any
inherited KUBECONFIG env var in the parent process environment.

Also adds test_kubectl_connection Tauri command (runs kubectl cluster-info
with the stored kubeconfig) and a Test button in Settings → Kubeconfig so
the exact kubectl output — context name, exit code, full stdout/stderr — is
visible without needing to inspect tracing logs. This output will reveal
whether the issue is expired certs, a missing exec-auth plugin, wrong context,
or something else entirely.
sarman added 1 commit 2026-06-08 01:50:09 +00:00
Merge branch 'master' into fix/kube-select-label-and-context
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
fd3b7a8ff6
sarman merged commit d65593af1e into master 2026-06-08 01:50:25 +00:00
sarman deleted branch fix/kube-select-label-and-context 2026-06-08 01:50:25 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sarman/tftsr-devops_investigation#82
No description provided.