Skip to content

Avoid change user global kube config#1024

Open
wdhongtw wants to merge 1 commit intoAI-Hypercomputer:mainfrom
wdhongtw:kube-sandbox
Open

Avoid change user global kube config#1024
wdhongtw wants to merge 1 commit intoAI-Hypercomputer:mainfrom
wdhongtw:kube-sandbox

Conversation

@wdhongtw
Copy link

@wdhongtw wdhongtw commented Feb 5, 2026

Description

Try creating sandbox kube config for xpk tool, avoiding confusing bug and allowing parallel invocation of xpk tools in same environment.

To preserve original behavior, this change is activated through an optional flag and default to false.

Issue

xpk tool running in background will suddenly interrupt user's foreground work once the cluster healthy check is passed.
Because xpk will try to get a credential and update user's global kube config and activate it.

Testing

Manually tested.

@scaliby
Copy link
Member

scaliby commented Feb 5, 2026

Hey @wdhongtw! Thanks for the change.
Could you please re-write it without the decorator approach? It seems redundant here as this logic should a first-class citizen in the codebase rather than hidden in a python's decorator.
Additionally, this is changing behavior of XPK that our users could rely on. Could you please hide this logic behind a feature flag for now? We will discuss within the team when and if to release this to wider public.
Thanks!

@wdhongtw wdhongtw marked this pull request as draft February 5, 2026 09:24
@wdhongtw
Copy link
Author

wdhongtw commented Feb 5, 2026

Turn back to draft to address the comment above. 🙂‍↕️

Try creating sandbox kube config for xpk tool, avoiding confusing bug
and allowing parallel invocation of xpk tools in same environment.

To preserve original behavior, this change is activated through an
optional flag and default to false.

Signed-off-by: Weida Hong <wdhongtw@google.com>
@wdhongtw wdhongtw marked this pull request as ready for review February 5, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants