Skip to content

Support configurable listener port for the per-stack Gateway#1439

Open
yardenmaymon-td wants to merge 1 commit into
llm-d:mainfrom
yardenmaymon-td:gateway-listener-port
Open

Support configurable listener port for the per-stack Gateway#1439
yardenmaymon-td wants to merge 1 commit into
llm-d:mainfrom
yardenmaymon-td:gateway-listener-port

Conversation

@yardenmaymon-td
Copy link
Copy Markdown
Contributor

What

Adds an optional gateway.listenerPort config that renders a custom HTTP listener into the per-stack Gateway resource (11_infra.yaml.j2).

  • gke / agentgateway / istio (and any custom istio class): when gateway.listenerPort is set, a default HTTP listener on that port is rendered into the listeners block. When unset, the block is omitted and behaviour is unchanged.
  • data-science-gateway-class: this class pins the listener to port 443 (HTTPS + TLS terminate), so listenerPort is unsupported there. A new raise jinja global makes the template fail loudly with a clear message instead of silently producing an invalid Gateway.

Why

Lets scenarios expose the Gateway on a non-default port without editing templates, while keeping the fixed-port classes safe.

Notes

  • Default behaviour (no listenerPort) is unchanged for every gateway class.
  • A falsy value (0) is treated as unset.
  • Documented the option in defaults.yaml.

Testing

New tests/test_gateway_listener_port.py (16 tests) renders the real template for every gateway class, with and without listenerPort, asserts the data-science guard raises, and covers the raise global. Full suite: 288 passed, 4 skipped.

🤖 Generated with Claude Code

Render gateway.listenerPort (when set) into the listeners block for the
gke, agentgateway, and istio gateway classes. data-science-gateway-class
pins the listener to 443 HTTPS+TLS, so a new `raise` jinja global makes
the template fail loudly if listenerPort is set there. Default behaviour
(no listenerPort) is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Yarden Maymon <yarden.maymon@twodelta.com>
@yardenmaymon-td yardenmaymon-td force-pushed the gateway-listener-port branch from c0a62d0 to 03ec046 Compare June 1, 2026 18:43
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.

1 participant