[ENG-5559] Add support for k8s-backed sandboxes#24
Open
torrefatto wants to merge 6 commits intomainfrom
Open
Conversation
bchatelard
reviewed
Mar 25, 2026
koyeb/sandbox/executor_client.py
Outdated
Comment on lines
59
to
60
| self.headers["X-Sandbox-Id"] = conn_info.routing_key | ||
| # Use session for connection pooling |
Member
There was a problem hiding this comment.
I think it's not what's in the spec
Member
Author
There was a problem hiding this comment.
I changed it to X-Routing-Key.
bchatelard
reviewed
Mar 25, 2026
| from .executor_client import SandboxClient | ||
|
|
||
| client = SandboxClient(sandbox_url, self.sandbox_secret) | ||
| client = SandboxClient(ConnectionInfo(sandbox_url, header, self.sandbox_secret)) |
Member
There was a problem hiding this comment.
secret is header as well no?
Member
Author
There was a problem hiding this comment.
header is the value of the routing_key. I can rename it for clarity.
lukaszo
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are introducing k8s-backed sandboxes. To communicate with those, we will not pass through the existing GLB/IGW machinery but rather use an ingress listening on a public address for each cluster. To communicate with the sandbox executor API we need said ingress url and a routing key. We must retrieve that info from the deployment metadata. If present, we use it, otherwise we fall back to the previous mechanism.