Skip to content

examples: kgateway with mesh authorization - #812

Merged
aojea merged 3 commits into
google:mainfrom
merterbak:examples/kgateway
Oct 25, 2026
Merged

aojea merged 3 commits into
google:mainfrom
merterbak:examples/kgateway

Conversation

@merterbak

Copy link
Copy Markdown
Contributor

Part of #734 (kgateway).

Adds development/examples/kgateway/: kgateway stays the gateway, and an agentmesh-node decides each request over gRPC ext_authz. There are two routes. One goes to a local MCP server, and the other goes through the mesh to a server in another namespace.

run.sh sets up a kind cluster and checks:

  • allowed and denied calls for two users
  • no token, the wrong audience, and the node's own token are all refused
  • with the node down, kgateway returns 503 (failOpen: false, statusOnError: 503), and it recovers once the node is back

The guide is site/content/docs/guides/kgateway.md.

Tested with kind v0.33.0 (k8s v1.37.0) on macOS arm64.

@merterbak
merterbak requested a review from aojea as a code owner October 25, 2026 10:29
@google-cla

google-cla Bot commented Oct 25, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a comprehensive example and documentation guide for integrating kgateway with mesh authorization using an agentmesh-node over Envoy ext_authz. It includes Kubernetes manifests for local and remote applications, gateway configurations, mesh infrastructure (Keycloak, control plane, router, node), Keycloak realm settings, and a test script (run.sh) to automate the setup and verification in a local kind cluster. The review feedback suggests improving the troubleshooting experience in run.sh by redirecting the output of kind create cluster and helm upgrade commands to log files instead of silencing them entirely.

Comment thread development/examples/kgateway/run.sh Outdated
Comment thread development/examples/kgateway/run.sh Outdated
merterbak and others added 2 commits October 25, 2026 13:34
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@merterbak merterbak changed the title examples: kgateway with mesh authorization, with a script that checks… examples: kgateway with mesh authorization Oct 25, 2026
@aojea
aojea merged commit fc89ca5 into google:main Oct 25, 2026
21 checks passed
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.

2 participants