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

Improve ResourceLocation API, allow proxy to use authenticated transport #5805

Merged
merged 1 commit into from
Mar 24, 2015

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Mar 23, 2015

This is a first step to making /proxy able to work against a secured node. It does the following:

  • Make ResourceLocation return a structured URL object (clarifies issues with returning URLs without schemes)
  • Allow ResourceLocation to return an optional round tripper to use when contacting the remote URL
  • Allow /proxy to connect to TLS backends
  • Fix issue with /proxy prepending /ns/<namespace> even when namespace was empty
  • Stop assuming http for connections to nodes

@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.

@liggitt liggitt force-pushed the node_proxy branch 2 times, most recently from 3431ecf to 5545fab Compare March 23, 2015 20:04
@liggitt
Copy link
Member Author

liggitt commented Mar 23, 2015

@smarterclayton
Copy link
Contributor

Structurally this is sound - essentially we're saying ResourceLocation as a method is providing Storage consumers in the code the ability to locate a remote resource and connect to it (i.e. a Pod has both a local identity in the apiserver and a remote identity on the kubelet). The proxiers can then use this to determine how to connect to a remote agent. It does mean ResourceLocation that returns a transport is not by default remotable (we wouldn't return the transport to the client in almost all cases) but since proxy was consuming resourcelocation and we need to continue consuming that, it seems like the right abstraction for allowing other REST resources to connect to pods.

@bgrant0607
Copy link
Member

cc @lavalamp @davidopp, in case they want to review or assign a reviewer

Yes, proxy has been broken in multiple ways. That implies lack of testing.

FYI: proxy-related issues:

namespaces - #5339
problematic rewriting and path structure - #4440
proposal to convert internal resourcelocation API to endpoints subresource: #4440 (comment)
bastion - #3481
dos - #4875

@liggitt
Copy link
Member Author

liggitt commented Mar 24, 2015

Rebased

@smarterclayton
Copy link
Contributor

LGTM

@smarterclayton
Copy link
Contributor

Will merge in the morning

@smarterclayton
Copy link
Contributor

Travis is failing

smarterclayton added a commit that referenced this pull request Mar 24, 2015
Improve ResourceLocation API, allow proxy to use authenticated transport
@smarterclayton smarterclayton merged commit aee9bdd into kubernetes:master Mar 24, 2015
@liggitt liggitt deleted the node_proxy branch March 24, 2015 18:15
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

Successfully merging this pull request may close these issues.

4 participants