Repository navigation
feat: make local kubeconfig auto-discovery explicit, countable, and opt-out - #19
Merged
Merged
Conversation
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.
What does this PR do?
Discovery contract: explicit local kubeconfig telemetry
Added localKubeconfigAutoDiscovery to snapshot metadata and graph payload.
Contract fields:
Contract is always present in graph snapshot shape.
Resolver refactor: local kubeconfig discovery is now explicit
Introduced a dedicated kubeconfig resolver path (ResolveKubeConfig) that:
Local context counting is derived from parsed kubeconfig data, without cluster calls.
Opt-out controls: CLI + environment
Added --discover-local-kubeconfig to both serve and start (default true).
Added INFRACANVAS_DISCOVER_LOCAL_KUBECONFIG override.
Wired this setting through both:
Kubernetes discovery initialization
Kubernetes action executor initialization
Explicit uploaded Cluster connections (kubeconfig via UI) remain unaffected.
UI: one-time local auto-discovery notice
Added a dismissible first-load notice when local kubeconfig contexts were auto-discovered and connected.
Notice is shown only for local host session and only when ran && discoveredContexts > 0 && connectedContexts > 0.
Dismissal is persisted in localStorage to avoid repeated display across refresh/reconnect.
No notice for disabled discovery, in-cluster-only config, zero contexts, or explicit uploaded Cluster sessions.
Docs/security updates
Updated README and SECURITY docs with:
Updated command help environment variable sections accordingly.
Type of change
Testing
make testpassesmake lintpassesnpm run build)Related issues
closes #15