obmarg / kazan

Kubernetes API client for Elixir
https://hex.pm/packages/kazan
MIT License
140 stars 35 forks source link

implement basic auth when username and password are given #61

Closed iffyuva closed 5 years ago

iffyuva commented 5 years ago

Im trying to get kazan working with k3s (https://k3s.io/) released by Rancher. After starting the k3s server, kube config looks like this

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <<encoded-certificate-data>>
    server: https://localhost:6443
  name: default
contexts:
- context:
    cluster: default
    user: default
  name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
  user:
    password: randomized-password
    username: admin

None of the existing server auth methods support username/password authentication ie basic authentication strategy. This PR implements that. Tested with k3s and works fine!

obmarg commented 5 years ago

Nice stuff @iffyuva, thanks for the contribution.

iffyuva commented 5 years ago

@obmarg let me know if you are doing a release anytime soon, helps me a lot :)

obmarg commented 5 years ago

Released in v0.11.0 now @iffyuva - thanks again

iffyuva commented 5 years ago

@obmarg thanks for new release 🎉