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

Add support for HTTP Basic authentication #113

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

nielsslot
Copy link
Contributor

I tried using k8s-client with a kubeconfig that uses username and password for authentication and noticed it didn't work. K8s::Config already had support for reading the relevant fields from the YAML, but K8s::Transport ignored them.

This change makes K8s::Transport use the username and password if available. The username and password are passed as an HTTP Authorization Basic header to the Kubernetes API server. I can now use k8s-client to query the Kubernetes server using the kubeconfig with username and password.

@jakolehm jakolehm requested a review from kke April 15, 2019 05:27
@jakolehm jakolehm added the enhancement New feature or request label Apr 15, 2019
@jakolehm
Copy link
Contributor

@kke PTAL

@jakolehm jakolehm merged commit 209dbc6 into kontena:master Apr 30, 2019
@jakolehm jakolehm mentioned this pull request May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants