feat: add CLUSTER_DOMAIN environment variable to the agent sandbox ro…#803
Conversation
|
|
✅ Deploy Preview for agent-sandbox canceled.
|
|
Welcome @patcrombie! |
|
Hi @patcrombie. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Pull request overview
Adds support for non-default Kubernetes cluster DNS domains in the sandbox-router by introducing an optional CLUSTER_DOMAIN environment variable used when constructing the in-cluster target URL for proxied requests.
Changes:
- New
_get_cluster_domain()helper andDEFAULT_CLUSTER_DOMAIN = "cluster.local"constant. proxy_requestnow buildstarget_hostusing the resolved cluster domain instead of a hard-codedcluster.local.- Unit tests covering default value, env-var override, empty-string fallback, and target URL construction with a custom domain.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| clients/python/agentic-sandbox-client/sandbox-router/sandbox_router.py | Adds CLUSTER_DOMAIN env-var support and uses it when building the proxy target host. |
| clients/python/agentic-sandbox-client/sandbox-router/test_sandbox_router.py | Adds tests for the new helper and for target URL construction with a custom cluster domain. |
53b4815 to
e217cad
Compare
|
/approve please resolve the merge conflicts @patcrombie |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: barney-s, patcrombie The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…uter These changes add an optional CLUSTER_DOMAIN environment variable to the sandbox router app. Some Kubernetes clusters have custom cluster domains that differ from the default `cluster.local`. The sandbox router won't work in these clusters becasue can't correctly build the `target_url` it needs to route requests to sandboxes. These changes allow a user to set the `CLUSTER_DOMAIN` environment variable and for the sandbox router to able to correctly proxy requests in clusters when this domain is not `cluster.local`
e217cad to
b86eaef
Compare
|
/lgtm |
|
/ok-to-test |
…uter (kubernetes-sigs#803) These changes add an optional CLUSTER_DOMAIN environment variable to the sandbox router app. Some Kubernetes clusters have custom cluster domains that differ from the default `cluster.local`. The sandbox router won't work in these clusters becasue can't correctly build the `target_url` it needs to route requests to sandboxes. These changes allow a user to set the `CLUSTER_DOMAIN` environment variable and for the sandbox router to able to correctly proxy requests in clusters when this domain is not `cluster.local`
…uter (kubernetes-sigs#803) These changes add an optional CLUSTER_DOMAIN environment variable to the sandbox router app. Some Kubernetes clusters have custom cluster domains that differ from the default `cluster.local`. The sandbox router won't work in these clusters becasue can't correctly build the `target_url` it needs to route requests to sandboxes. These changes allow a user to set the `CLUSTER_DOMAIN` environment variable and for the sandbox router to able to correctly proxy requests in clusters when this domain is not `cluster.local`
What this PR does / why we need it:
These changes add an optional CLUSTER_DOMAIN environment variable to the sandbox router app. Some Kubernetes clusters have custom cluster domains that differ from the default
cluster.local. The sandbox router won't work in these clusters becasue can't correctly build thetarget_urlit needs to route requests to sandboxes. These changes allow a user to set theCLUSTER_DOMAINenvironment variable and for the sandbox router to able to correctly proxy requests in clusters when this domain is notcluster.localWhich issue(s) this PR is related to:
Release Note