Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass empty kubeconfig path when loading default Kubernetes configuration #2540

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jbarrick-mesosphere
Copy link

Previously, in-cluster configuration could not be used because the
ExplicitPath was always set in the ClientConfigLoadingRules.

If ExplicitPath is not set, ClientConfigLoadingRules will look up
all of the standard environment variables to find the kubeconfig file,
including supporting in cluster authentication.

We leave the kubeconfig parameter on FromKubeConfig to support
explicitly setting the path and also to not change the signature.

This will fix docker/buildx#256 once the docker/cli dependency is
updated.

Signed-off-by: [email protected] [email protected]

- Description for the changelog

Added support for in-cluster Kubernetes authentication for Kubernetes contexts.

Previously, in-cluster configuration could not be used because the
ExplicitPath was always set in the `ClientConfigLoadingRules`.

If `ExplicitPath` is not set, `ClientConfigLoadingRules` will look up
all of the standard environment variables to find the kubeconfig file,
including supporting in cluster authentication.

We leave the `kubeconfig` parameter on `FromKubeConfig` to support
explicitly setting the path and also to not change the signature.

This will fix docker/buildx#256 once the docker/cli dependency is
updated.

Signed-off-by: [email protected] <[email protected]>
Copy link
Contributor

@simonferquel simonferquel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit to me

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@silvin-lubecki
Copy link
Contributor

Ping @mat007 do we want this PR for the next 20.0X release? If so we need to be sure it won't break desktop.

@AkihiroSuda
Copy link
Collaborator

PTAL @tonistiigi @thaJeztah

Seems needed for docker/buildx#256

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.

Support for in cluster kubernetes client
6 participants