Skip to content

embeddable mode #122

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

embeddable mode #122

wants to merge 4 commits into from

Conversation

ecordell
Copy link
Collaborator

@ecordell ecordell commented Jun 24, 2025

This provides an embedded mode that, if enabled, allows you to run the proxy in-process with another go application. Authentication is done via headers only in this mode (trusted because it's the same process) and provides helpers for generating clients that can access the embedded proxy.

When you execute an API call, the http request is buffered in memory for use by the application. I played some with lazily evaluating the request when the response body is read - this has the advantage of keeping memory low when streaming large responses, but the UX gets a little weird (i.e. can't read headers until 1 byte has been read from the body). It might be worth revisiting that approach in the future if needed.

@github-actions github-actions bot added area/core area/tooling Affects the dev or user toolchain labels Jun 24, 2025
@ecordell ecordell force-pushed the noauth branch 2 times, most recently from 48f16b7 to a23af9c Compare June 26, 2025 20:12
@github-actions github-actions bot added the area/docs Affects docs or metadata (e.g. README) label Jun 26, 2025
@ecordell ecordell marked this pull request as ready for review June 26, 2025 20:17
@ecordell ecordell force-pushed the noauth branch 4 times, most recently from b740847 to 0043938 Compare June 30, 2025 18:49
Copy link
Member

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

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

Can you add an e2e test that calls the embedded mode from a Kube client?

@github-actions github-actions bot added the area/dependencies Affects dependencies label Jul 15, 2025
@ecordell
Copy link
Collaborator Author

Added an e2e test that does kube client -> embedded proxy -> kube apiserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/dependencies Affects dependencies area/docs Affects docs or metadata (e.g. README) area/tooling Affects the dev or user toolchain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants