Skip to content

[Go SDK] Support configuration option to opt-out or toggle direct Pod IP routing #916

@moficodes

Description

@moficodes

Description

In PR #910, the Go SDK was updated to automatically and unconditionally inject the X-Sandbox-Pod-IP header in SendRequest whenever a Pod IP is resolved and populated. While this is a highly pragmatic default that resolves 502 bad gateway errors in standard deployments without cluster DNS, it can cause routing issues in environments with strict network policies, service meshes, or secure overlays where direct pod-to-pod IP communication is restricted but service-based DNS routing is required.

In the Python SDK, direct Pod IP routing can be explicitly toggled on or off via the use_pod_ip: bool option inside SandboxInClusterConnectionConfig.

Proposed Changes

  1. Add a configuration option/toggle (e.g. UsePodIP or DisablePodIPRouting field) to the Go SDK's connection/client configuration.
  2. Update the SendRequest implementation in the connector to respect this flag, omitting the X-Sandbox-Pod-IP header when the option is disabled.
  3. Update relevant documentation and add unit tests to verify header injection behaves according to the configuration toggle.

Metadata

Metadata

Assignees

Labels

priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

Type

No type
No fields configured for issues without a type.

Projects

Status
Linked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions