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

When an empty / default k8s provider is used for ambient creds, it only works with ~/.kube/config not with KUBECONFIG #1252

Closed
metral opened this issue Aug 14, 2020 · 1 comment · Fixed by #1255
Assignees
Labels
p1 A bug severe enough to be the next item assigned to an engineer
Milestone

Comments

@metral
Copy link
Contributor

metral commented Aug 14, 2020

Problem description

Creating a default k8s provider as such only works if KUBECONFIG is not set, and the kubeconfig exists at it's default location: $HOME/.kube/config

const k8sProvider = new k8s.Provider("k8s");

Errors & Logs

Errors out trying to parse empty YAML if KUBECONFIG is used, as the provider only seems to be checking for the file $HOME/.kube/config

@lblackstone lblackstone self-assigned this Aug 17, 2020
@lblackstone lblackstone added this to the 0.42 milestone Aug 17, 2020
@lblackstone
Copy link
Member

This regression was caused by #1166

This change causes the SDKs to load the value of KUBECONFIG, which is a path to the file, not the contents of the file, causing the provider to fail during the Configure phase.

Rather than reverting this change, I think it makes the most sense to update the provider to handle either the contents or the path to the KUBECONFIG, and only fail with an error if both of these options fail.

Related: #1032

@leezen leezen modified the milestones: 0.42, current Aug 25, 2020
@infin8x infin8x added the p1 A bug severe enough to be the next item assigned to an engineer label Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 A bug severe enough to be the next item assigned to an engineer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants