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

allow any number of kubeconfig files #5541

Merged
merged 1 commit into from
Mar 18, 2015

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Mar 17, 2015

Restricting .kubeconfig files to only four locations made it see exactly where files were coming from, but it made extending the mechanism just about impossible. This allows a separate precedence order slice that allows easy extensions. ExplicitPath (previously CommandLinePath) is special and still called out because if the ExplicitPath is set, the referenced file must be present. Missing files in the rest of the precedence order are simply ignored.

@googlebot
Copy link

Thanks for your pull request.

It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/.

If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@deads2k
Copy link
Contributor Author

deads2k commented Mar 17, 2015

@smarterclayton This is what @fabianofranz wanted for openshift/origin#992. It makes extension of loading order to allow more files possible.

@@ -33,31 +33,35 @@ import (
const (
RecommendedConfigPathFlag = "kubeconfig"
RecommendedConfigPathEnvVar = "KUBECONFIG"
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommended* consts for the file names in local and home dirs (.kubeconfig and /.kube/.kubeconfig)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Recommended* consts for the file names in local and home dirs (.kubeconfig and /.kube/.kubeconfig)?

I'd prefer not to do that in this pull. The location of the files isn't necessarily fixed. #4615 proposes new locations (for good reasons) and #4428 proposes changes as well. I don't think we've closed on a recommended location or even whether that location is a file or directory.

@fabianofranz
Copy link
Contributor

2 comments otherwise LGTM.

@brendandburns
Copy link
Contributor

Seems reasonable to me.

@brendandburns brendandburns added lgtm "Looks good to me", indicates that a PR is ready to be merged. cla: yes and removed cla: no labels Mar 17, 2015
@j3ffml j3ffml self-assigned this Mar 17, 2015
j3ffml added a commit that referenced this pull request Mar 18, 2015
@j3ffml j3ffml merged commit 7269960 into kubernetes:master Mar 18, 2015
@deads2k deads2k deleted the deads-expose-resolve-local-paths branch June 11, 2015 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants