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

Make raw Client::send method public #972

Merged
merged 1 commit into from Aug 3, 2022

Conversation

tiagolobocastro
Copy link
Contributor

This makes the send method public, which can be used to communicate directly with the API server.
This can be used to create a proxy server or application-level gateway between localhost and the
Kubernetes API server.

Signed-off-by: Tiago Castro tiagolobocastro@gmail.com

Motivation

I came across the need for this while trying to write a proxy to a k8s service using the api-server. Essentially what kubectl proxy does.

Solution

By making the send method public, we can have Service impl that routes requests through the kube-client send method.
Now, I also wonder if we could instead provide a means to access the inner service, which could then simply be plugged in?

This makes the send method public, which can be used to communicate directly with the API server.
This can be used to create a proxy server or application-level gateway between localhost and the
 Kubernetes API server.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
@clux clux added the changelog-add changelog added category for prs label Aug 3, 2022
@clux clux added this to the 0.75.0 milestone Aug 3, 2022
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

Looks sensible to me :-)

@clux clux changed the title chore(kube-client): make raw send method public Make raw Client::send method public Aug 3, 2022
@clux clux merged commit fb695bc into kube-rs:master Aug 3, 2022
tiagolobocastro added a commit to openebs/mayastor-control-plane that referenced this pull request Aug 4, 2022
This consists of a layer7 proxy using the kube-rs text request.
Once kube-rs/kube#972 is released we'll tweak this commit
to make use of the raw request, thus avoid multiple data conversions.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-add changelog added category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants