Skip to content

Feat/expand migration examples 596#641

Open
Ashutoshx7 wants to merge 1 commit into
kgateway-dev:mainfrom
Ashutoshx7:feat/expand-migration-examples-596
Open

Feat/expand migration examples 596#641
Ashutoshx7 wants to merge 1 commit into
kgateway-dev:mainfrom
Ashutoshx7:feat/expand-migration-examples-596

Conversation

@Ashutoshx7

Copy link
Copy Markdown
Contributor

Description

This PR significantly expands the Ingress migration documentation by adding comprehensive, step-by-step examples for common NGINX patterns.

Motivation:
Addresses the lack of advanced migration examples noted in the Ingress Migration Epic #628. Specifically, it fills the feature parity gaps for the 2.2 release by providing clear paths for Authentication (JWT, OIDC, API Key) and standard Gateway API filters.

What changed:

  • Added 10 new migration examples in the Envoy-based migration guide:
    • Auth: Basic Auth, JWT Authentication, API Key Authentication, OIDC Authentication.
    • Traffic Control: Header Modifiers, Timeouts, URL Rewriting, Request Buffering, Traffic Mirroring.
    • Security: Client TLS (mTLS).
  • Fixed Build Errors: Resolved pre-existing build failures by adding the missing migration examples in the agentgateway section (canary.md and session-affinity.md).
  • Improved UX: Updated the migration index page with logical grouping and better weights for easier navigation.
  • Architectural Accuracy: All examples follow the correct kgateway patterns (e.g., using GatewayExtension for JWT/OIDC and TrafficPolicy for Auth/Timeouts).

Related issues:
Fixes #596
Part of #628

Change Type

/kind documentation
/kind fix

Changelog

Expand Ingress migration guides with 10 new advanced examples including OIDC, JWT, API Key, and mTLS.

@Ashutoshx7 Ashutoshx7 force-pushed the feat/expand-migration-examples-596 branch from 778018a to 781fa00 Compare January 30, 2026 12:37
@Ashutoshx7

Copy link
Copy Markdown
Contributor Author

@artberger awaiting your reviews

@@ -0,0 +1,73 @@
---
title: "Migrate from Ingress"

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.

The agentgateway content is no longer maintained in this repo. You can move this information to: https://github.com/agentgateway/website

name: timeouts-demo-timeouts-example-com
timeouts:
request: 60s
backendRequest: 60s

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.

timeouts.backendRequest is not a valid field. The Timeouts type has two sub-fields: request and streamIdle. The second field should be streamIdle: 60s, not backendRequest: 60s.

metadata:
name: timeouts-demo
annotations:
nginx.ingress.kubernetes.io/proxy-connect-timeout: "15"

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.

proxy-connect-timeout: "15" has no equivalent in TrafficPolicy.timeouts. The connect timeout belongs in BackendConfigPolicy.spec.connectTimeout. The page should either drop it with a note, or add a separate BackendConfigPolicy block to cover it.

- group: gateway.networking.k8s.io
kind: HTTPRoute
name: upload-demo-upload-example-com
buffer:

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.

buffer.maxRequestSize is confirmed valid and accepts a Kubernetes Quantity string. "20Mi" is a valid value. The unit mismatch (NGINX 20m = decimal megabytes, 20Mi = mebibytes) is technically imprecise but close enough in practice that it's not a blocking issue.

- openid
- email
credentials:
clientId: my-client-id

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.

credentials.clientId is wrong. The API field is clientID (capital I and D).

weight: 34
---

Many teams use `oauth2-proxy` as a sidecar or external service to handle OIDC/OAuth2 for NGINX. kgateway simplifies this by providing native support via a `GatewayExtension` and `TrafficPolicy`.

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.

The NGINX source pattern uses an OAuth2 proxy sidecar, not direct OIDC. The page should note the reader is making an architectural change, not a one-for-one translation.

issuer: "https://issuer.example.com"
jwks:
remote:
uri: "https://issuer.example.com/.well-known/jwks.json"

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.

jwks.remote.uri uses url, not uri.

weight: 40
---

Mutual TLS (mTLS) allows the gateway to verify the identity of the client via a certificate. NGINX uses annotations like `auth-tls-verify-client`, whereas Gateway API (v1.1+) handles this through `frontendValidation` on a Gateway listener.

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.

frontendValidation.caCertificateRefs is standard Gateway API (added in v1.3, experimental in some builds). No kgateway-specific fields are involved, so the YAML itself is correct. The page should add a note on the minimum Gateway API version required, since not all clusters will have it available.

- matches:
- path:
type: PathPrefix
value: /api/v1

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.

There is an edge case where path /api/v1 (no trailing slash) would produce an empty replacement string with ReplacePrefixMatch: / — worth a one-line callout but not a blocking bug.

@kristin-kronstain-brown

Copy link
Copy Markdown
Contributor

@Ashutoshx7 Did you plan on taking another look at the conflicts and comments? Thanks!

Add 10 new migration examples for the Envoy-based migration guide:
- Auth: Basic Auth, JWT, API Key, OIDC Authentication
- Traffic: Header Modifiers, Timeouts, URL Rewriting, Request Buffering, Traffic Mirroring
- Security: Client TLS (mTLS)

Review fixes applied:
- timeouts.md: use streamIdle (not backendRequest); move proxy-connect-timeout to BackendConfigPolicy
- oidc-auth.md: fix clientID casing; add architectural change callout
- jwt-auth.md: use url (not uri) in jwks.remote
- client-tls.md: add Gateway API v1.3 version warning
- url-rewriting.md: add edge-case callout for empty replacement
- request-buffering.md: note decimal-vs-mebibyte unit difference

Fixes kgateway-dev#596
Part of kgateway-dev#628
@Ashutoshx7 Ashutoshx7 force-pushed the feat/expand-migration-examples-596 branch from 3b5cef8 to f85d844 Compare June 6, 2026 04:02
@Ashutoshx7

Copy link
Copy Markdown
Contributor Author

@Ashutoshx7 Did you plan on taking another look at the conflicts and comments? Thanks!

hy sorry for the delay
can u review this pr again ?
i have made the asked changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingress Migration: Add More Migration Examples

2 participants