Skip to content

Set the gateway pod selector in AI Gateway example - #1364

Merged
aponcedeleonch merged 2 commits into
mainfrom
aigw/networkpolicy-pod-selector
Nov 20, 2026
Merged

aponcedeleonch merged 2 commits into
mainfrom
aigw/networkpolicy-pod-selector

Conversation

@aponcedeleonch

Copy link
Copy Markdown
Member

Description

The ai-gateway-v2 chart no longer defaults the NetworkPolicy ingress to Envoy Gateway. stacklok/stacklok-enterprise-platform#6921 empties networkPolicy.ingress.gatewayNamespaces and gatewayPodSelector, and the render refuses an enabled policy with no pod selector. The example in "Restrict network access" sets only gatewayNamespaces, so it fails on that chart.

This PR adds gatewayPodSelector: {app.kubernetes.io/name: envoy} to the example and says what the two keys select. The example renders the same NetworkPolicy on the current chart, where that selector is already the default, and works on the next one.

The Helm reference page (reference/helm/ai-gateway.mdx) still lists the old defaults. It's generated from the chart at release, so I left it alone.

Type of change

  • Documentation update

Related issues/PRs

  • stacklok/stacklok-enterprise-platform#6921

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

🤖 Generated with Claude Code

The ai-gateway-v2 chart no longer defaults the NetworkPolicy ingress to
Envoy Gateway, and refuses an enabled policy with no pod selector. Name
the selector in the example so it renders on the current and the next
chart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-website Ready Ready Preview Nov 20, 2026 1:49pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documented value paths omit networkPolicy, which can cause readers to configure the wrong keys and leave required selectors unset.

1 open issue
What changed in this PR

Updates the AI Gateway configuration guide so its network policy example explicitly supplies the gateway pod selector required by the upcoming chart.

Changes:

  • Adds an Envoy proxy pod selector to the YAML example.
  • Explains how the pod selector and namespace list control ingress.
File Description
docs/​platform/​enterprise-platform/​configure-ai-gateway.mdx Adds the gateway pod selector and clarifies ingress selection.

Review effort: Balanced

Comment on lines +307 to +311
- **Ingress** admits only the pods that match `ingress.gatewayPodSelector` in
`ingress.gatewayNamespaces`. Set both to your Gateway's data plane. The
example uses Envoy Gateway's proxy pods. `ingress.gatewayNamespaces` must not
be empty. The metrics port is admitted from `ingress.monitoringNamespaces`
when Prometheus metrics are on.

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.

Good catch, fixed in a996b4c. The ingress bullet now uses the full networkPolicy.ingress.* paths, including monitoringNamespaces, which matches the egress bullet and the page's convention.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aponcedeleonch
aponcedeleonch merged commit 86c42a6 into main Nov 20, 2026
10 checks passed
@aponcedeleonch
aponcedeleonch deleted the aigw/networkpolicy-pod-selector branch November 20, 2026 14:12

This branch was successfully deployed

1 active deployment
Preview — a996b4ce Deployed Nov 20, 2026 by vercel[bot]
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