Skip to content

[ENG-5559] Add support for k8s-backed sandboxes#24

Open
torrefatto wants to merge 6 commits intomainfrom
feat/5559/use-metadata-url-first
Open

[ENG-5559] Add support for k8s-backed sandboxes#24
torrefatto wants to merge 6 commits intomainfrom
feat/5559/use-metadata-url-first

Conversation

@torrefatto
Copy link
Copy Markdown
Member

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.

Comment on lines 59 to 60
self.headers["X-Sandbox-Id"] = conn_info.routing_key
# Use session for connection pooling
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's not what's in the spec

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I changed it to X-Routing-Key.

from .executor_client import SandboxClient

client = SandboxClient(sandbox_url, self.sandbox_secret)
client = SandboxClient(ConnectionInfo(sandbox_url, header, self.sandbox_secret))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

secret is header as well no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

header is the value of the routing_key. I can rename it for clarity.

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.

3 participants