fix(backend/kubernetes): use default KUBECONFIG resolution#2672
Merged
tedim52 merged 4 commits intokurtosis-tech:mainfrom Mar 21, 2025
Merged
fix(backend/kubernetes): use default KUBECONFIG resolution#2672tedim52 merged 4 commits intokurtosis-tech:mainfrom
tedim52 merged 4 commits intokurtosis-tech:mainfrom
Conversation
5c5cbce to
1117a1b
Compare
Collaborator
|
this is a great change, will take a look |
Collaborator
|
Addresses: #2623 |
tedim52
approved these changes
Mar 13, 2025
tedim52
reviewed
Mar 13, 2025
Collaborator
|
tested on my end, works nicely! i think the duplication at the gateway level is okay |
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 18, 2025
🤖 I have created a release *beep* *boop* --- ## [1.7.0](1.6.0...1.7.0) (2025-04-17) ### Features * add grafloki to kurtosis config ([#2707](#2707)) ([b6794e1](b6794e1)) * export service logs (Kubenertes) ([#2693](#2693)) ([c00f357](c00f357)) * grafloki start/stop ([#2696](#2696)) ([53d823a](53d823a)) * service update ([#2689](#2689)) ([4cda391](4cda391)) ### Bug Fixes * **backend/kubernetes:** use default KUBECONFIG resolution ([#2672](#2672)) ([379e49b](379e49b)) * docker auth wasn't being used by engine and API ([#2699](#2699)) ([4eea787](4eea787)) * give grafana root access ([#2706](#2706)) ([b8e2fab](b8e2fab)) * remove k8s ingress on stop user services ([#2715](#2715)) ([e31c0d4](e31c0d4)) * return empty deployment if not found ([#2716](#2716)) ([451c70e](451c70e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Description
This PR modifies the Kubernetes backend and the CLI to use the K8s SDK's default resolution strategy, allowing them to read the user's K8s configuration from the
KUBECONFIGenvironment variable, rather than being hardcoded to only read from$HOME/.kube/config. This enables compatibility with a wider variety of local K8s configuration strategies by leveraging standard K8s practices.This change was primarily motivated by difficulties using Kurtosis with my own setup, wherein I have some scripting which dynamically constructs a
KUBECONFIGenvvar in order to work with multiple K8s clusters. It should not cause any issues, as the SDK's default resolution strategy ultimately falls back to reading from$HOME/.kube/config.There is some duplication in this PR as I couldn't figure out how to re-use the
kubernetesConfig/kubernetesManagercreated in the K8s backend in thegatewaymodule. Happy to take guidance on how to improve this if necessary.I've tested this PR locally and was successfully able to run successfully.
Is this change user facing?
YES
@tedim52 (pls LMK if there's a better person to tag)