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

Load config fails with env: null in users/user/exec section #637

Closed
Lawouach opened this issue Oct 4, 2018 · 5 comments
Closed

Load config fails with env: null in users/user/exec section #637

Lawouach opened this issue Oct 4, 2018 · 5 comments

Comments

@Lawouach
Copy link

Lawouach commented Oct 4, 2018

Hey there,

Client: 8.0.0a1
Server: Kubernetes 1.10.3
Provider: EKS

I created a cluster using eksctl and the generated kubeconf has the entry env: null under users/user/exec to which the client responds with:

ERROR:root:Invalid kube-config file. Expected key env in kube-config/users[name=iam-some-account@my-cluster.us-west-2.eksctl.io]/user/exec

When I remove the key entirely, it works nicely. When I fill the key with dictionary entries, it works too. I can only assume either env: null is invalid (then I will open a ticket on eksctl) or the client should support it.

Thanks,

@errordeveloper
Copy link

errordeveloper commented Oct 4, 2018

hey @Lawouach, thanks for finding and reporting this! Arguably, all client should tolerate this (null instead of {} or []), as kubectl and k8s.io/client-go currently do. The root cause of this is the exec authentication plugin stanza, which is still an alpha API (client.authentication.k8s.io/v1alpha1).

- name: ilya@unique-hideout-1536840907.us-west-2.eksctl.io
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - unique-hideout-1536840907
      command: heptio-authenticator-aws
      env: null

So to me this looks like two bugs actual bugs, what do you think?

@Lawouach
Copy link
Author

Lawouach commented Oct 4, 2018

Thank you @errordeveloper for the feedback here. I was struggling to find the API definition for this API. Arguably, the client should likely not choke on this value indeed.

@sc250024
Copy link

sc250024 commented Oct 9, 2018

Having the same problem. What was the outcome of this? Is there a PR with a fix, or is it something we all need to change?

@roycaihw
Copy link
Member

roycaihw commented Oct 9, 2018

I think @fillbit has a PR fixing this from client side: kubernetes-client/python-base#91. I will take a look at it today. Thanks for reporting :)

@roycaihw
Copy link
Member

Fixed by kubernetes-client/python-base#91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants