Skip to content

Add an agentgateway community blueprint for GKE - #6334

Merged
Neelabh94 merged 8 commits into
GoogleCloudPlatform:developfrom
danehans:agentgateway-gke
Nov 2, 2026
Merged

Neelabh94 merged 8 commits into
GoogleCloudPlatform:developfrom
danehans:agentgateway-gke

Conversation

@danehans

@danehans danehans commented Sep 16, 2026 •

Copy link
Copy Markdown

Adds a regional, CPU-only GKE blueprint using agentgateway v1.7.0 for a private multi-provider gateway. Gemini and OpenAI expose Chat Completions; Anthropic exposes native /v1/messages. Implements phase 1 of #6213 using shared IAM modules, with documented support for administrator-provisioned identities.

Gateway API can be enabled independently of Inference Extension. Each gateway/ingress release includes its readiness hook, which runs on installation and configuration changes. Readiness rejects partially valid backends and checks ingress policy attachment. The example includes a companion deployment file, smoke tests, schema checks and a manual integration playbook; upstream scheduling remains separate work. Node-pool lifecycle documentation is split into #6535.

This revision consolidates Helm releases and changes IAM resource addresses. Recreate disposable deployments from earlier PR revisions; existing deployments need migration planning. The monitoring-order workaround is removed following the upstream Google provider 8.x upgrade.

November 2 rebase and provider-argument fix

Rebased onto develop at 665778f29, preserving upstream catalog and configuration-discovery changes. Optional provider Secret flags are now omitted when unset. An Ansible regression check covers OpenAI only, Anthropic only, both and neither; it runs through make test-agentgateway without adding Ansible to the isolated pre-commit pytest environment.

  • Passed: make test-agentgateway (Go regression tests and 60 Python tests), Ansible syntax, pinned-chart static validation, and actual Ansible-to-gcluster create checks for all three enabled-provider combinations. These creation checks used offline cloud-validator settings and created no cloud resources.
  • Other applicable pre-commit hooks passed, but its full pytest hook has five failures in unchanged upstream Slurm code under local Python 3.14 (_DaemonThreadPoolExecutor._initializer). Broad Go tests also hit unchanged upstream config/cache and shell-signal test failures on macOS. These files match origin/develop and were not modified.
  • Full Linux tests were not rerun after this rebase because the local Docker engine did not respond. The successful full Linux and live results below are from October 28.

Validation

Validated on October 28, 2026:

  • Full Linux make tests and make agentgateway-static passed, including all 59 Python helper tests and optional-provider schema checks against both v1.7.0 charts. Applicable pre-commit checks passed.
  • A fresh v1.6.0 baseline upgraded through gcluster to v1.7.0. Both Helm releases and the controller/proxy images were verified at v1.7.0. The test used GKE 1.35.8-gke.1919000, Gateway API v1.5.0, Google provider 8.6.0 and administrator-provisioned identities.
  • Gemini gemini-2.5-flash and the synthetic provider passed synchronous, streaming and metrics checks through the internal load balancer. Synthetic resources and server pods were absent after runner exit, including immediately before deployment teardown.
  • A missing provider Secret blocked readiness with PartiallyValid; adding a dummy Secret completed the update. After restoring the base configuration, unchanged reapplication reported all four groups already applied.
  • The test deployment and associated network/compute resources were removed. Both IT-managed service accounts and the custom prediction role remain.
  • Live tests used the firewall fix from Fix firewall planning with unknown network inputs #6536 in the test copy only. Managed IAM provisioning and real OpenAI/Anthropic requests were not tested. GKE emitted the previously recorded GCP-2026-030/033 warnings for this patch. Gateway API compatibility remains 1.4–1.6 for agentgateway 1.7.x.

Earlier validation and review regression coverage are recorded in community/examples/agentgateway-gke/TESTING.md. Cloud Build requires a collaborator's /gcbrun before its checks can execute.

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@danehans
danehans requested a review from a team as a code owner September 16, 2026 16:58
@github-actions github-actions Bot added the external PR from external contributor label Sep 16, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new community blueprint for deploying a private, multi-provider generative AI gateway on GKE. It streamlines the setup of regional GKE clusters with integrated load balancing and secure identity management, while providing robust validation mechanisms to ensure consistent deployment states and model connectivity.

Highlights

  • New GKE Blueprint: Added a regional, CPU-only GKE blueprint for a multi-provider agentgateway, supporting Gemini via Workload Identity and optional OpenAI/Anthropic backends.
  • Infrastructure Modules: Introduced new Terraform modules for managing service account identities and Vertex AI prediction IAM roles.
  • Testing and Validation: Implemented comprehensive local validation scripts, in-cluster smoke tests, and Ansible-based integration testing to ensure deployment reliability.
  • Gateway API Integration: Configured GKE Standard Gateway API support, enabling internal load balancing and proxy routing for the agentgateway.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@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 new community blueprint for deploying a multi-provider agentgateway on GKE, along with supporting Terraform modules (agentgateway-identity and vertex-ai-prediction), integration tests, and validation scripts. The code review identified several critical issues and improvement opportunities: potential AttributeError crashes in readiness.py due to unhandled nullable status fields, an invalid sampleRate value in the GCPBackendPolicy template, compatibility issues with domain-scoped projects in the Workload Identity configuration, a potential StopIteration crash in run-in-cluster.py when no running proxy pod is found, and a recommendation to catch TimeoutError directly in smoke-test.py for more robust network retries.

@danehans

danehans commented Sep 18, 2026 •

Copy link
Copy Markdown
Author

@Neelabh94 when you have a moment, PTAL and kickoff CI.

@github-actions

Copy link
Copy Markdown

this PR has been inactive for 2 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@AdarshK15

Copy link
Copy Markdown
Member

@danehans, There is a merge conflict, could you please rebase the PR.

@danehans

Copy link
Copy Markdown
Author

@AdarshK15 I rebased and resolved the merge conflict. Please re-kick CI.

@github-actions

Copy link
Copy Markdown

this PR has been inactive for 2 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@github-actions

Copy link
Copy Markdown

This is a second reminder that this PR has been inactive for 4 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@danehans

Copy link
Copy Markdown
Author

@arpit974 @saara-tyagi27 do you need anything from me to get the review process started with this PR?

@arpit974

arpit974 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

this PR has been inactive for 2 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

This is a second reminder that this PR has been inactive for 4 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@danehans

danehans commented Oct 8, 2026

Copy link
Copy Markdown
Author

@arpit974 wanted to follow-up on this PR. Is there anything I can do to help move the review along?

@github-actions

Copy link
Copy Markdown

this PR has been inactive for 2 days and has no unresolved comments. @arpit974, @saara-tyagi27, please review.

@danehans

Copy link
Copy Markdown
Author

Pushed 848f577 with the rendering and smoke-retry fixes. Full Linux make tests, static checks, and live Gemini/synthetic sync, streaming and metrics tests passed. Model and ingress updates reran their hooks; missing-Secret rejection, rollback/recovery and the final no-change reapply passed too.

The live run used #6536 and existing identities. OpenAI/Anthropic calls were skipped as requested. Cloud Build checks need a collaborator to run /gcbrun.

Cleanup is complete. The test cluster and associated resources are gone; the administrator-provisioned accounts and prediction role remain.

@aslam-quad

Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94 Neelabh94 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.

Thanks @danehans for addressing all 16 items from the previous round and validating the updated blueprint on a live GKE cluster! The PR is largely LGTM — I left a few small follow-up notes on the existing threads where the latest changes introduced minor edge cases, along with two small nits in run_in_cluster.py. Once those are tidied up, this should be ready to approve.

Comment thread Makefile Resolved
@danehans

Copy link
Copy Markdown
Author

@aslam-quad can you /gcbrun?

@danehans
danehans requested a review from Neelabh94 October 28, 2026 19:13
@sudheer-quad

Copy link
Copy Markdown
Contributor

/gcbrun

Neelabh94
Neelabh94 previously approved these changes Oct 29, 2026

@Neelabh94 Neelabh94 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.

Thanks for addressing all the follow-up items and adding unit tests for the edge cases (and for verifying the v1.7.0 upgrade on GKE 1.35)! Everything looks clean and well-tested — LGTM.

cc @arpit974 @saara-tyagi27 to take a look and provide the second approval if everything looks good to them too.

@Neelabh94 Neelabh94 removed their assignment Oct 29, 2026
@aslam-quad

Copy link
Copy Markdown
Contributor

Hi @danehans

Could you please take a look at the merge conflicts.

Thanks

Deploy a private multi-provider gateway with Workload Identity and
optional administrator-provisioned service accounts.

Add standalone Gateway API support, readiness checks, and automated
integration validation. Keep monitoring configuration stable on reapply.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Recognize missing-secret diagnostics in v1.6.0 without treating a
partially valid backend as ready for requests.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Run readiness hooks with configuration updates and reject partial backends.
Simplify IAM wiring, colocate smoke tools, and strengthen failure coverage.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Render readiness manifests before passing them into stage templates.
Allow bounded retries while load-balancer backends propagate, and
record Linux and live deployment/update validation.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Share readiness checks, reject unsuitable proxy pods, and wait for
synthetic backend cleanup. Add focused regression tests and clearer
static validation diagnostics.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Update the shared chart version and catalog, and record Linux and live
upgrade validation results.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Omit unset provider Secret arguments and test all provider combinations
through Ansible. Refresh generated indexes after rebasing on develop.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
@Neelabh94

Copy link
Copy Markdown
Contributor

/gcbrun

@Neelabh94
Neelabh94 enabled auto-merge (squash) November 2, 2026 16:36
@Neelabh94
Neelabh94 merged commit 6e89b0b into GoogleCloudPlatform:develop Nov 2, 2026
43 of 115 checks passed
@danehans

danehans commented Nov 2, 2026

Copy link
Copy Markdown
Author

@Neelabh94 and all thanks a bunch for your support getting this PR through the finish line!

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

Labels

external PR from external contributor release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an agentgateway-based multi-provider AI gateway blueprint for GKE

7 participants