fix(cli): consume AGENT_GATEWAY_ROOT_CERTIFICATES in deploy Dockerfile - #7048
Open
claxman wants to merge 2 commits into
Open
fix(cli): consume AGENT_GATEWAY_ROOT_CERTIFICATES in deploy Dockerfile#7048claxman wants to merge 2 commits into
claxman wants to merge 2 commits into
Conversation
Cloud Build passes the Agent Gateway intercept CA as a build-arg, but the generated Dockerfile never declared it, so TLS interception certs were not installed. Fixes google#6427
This re-lands google#6428 by Solaris-star, which the author closed on 2026-08-12 after a maintainer LGTM. Rebased onto main and placed after adduser. Adds a template assertion. Fixes google#6427
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
_DOCKERFILE_TEMPLATEincli_deploy.pynever declaresAGENT_GATEWAY_ROOT_CERTIFICATES(rg AGENT_GATEWAY_ROOT_CERTIFICATES src/google/adk/cli/cli_deploy.pyonupstream/mainprints nothing). Cloud Build passes that build-arg for Agent Gateway TLS interception and warns it was not consumed; the reporter's aiohttp path then fails withCERTIFICATE_VERIFY_FAILED.Solution:
Re-lands #6428 by @Solaris-star, which was closed 2026-08-12 without merging (
gh pr view 6428 --json state,mergedAt->CLOSED/null). SameARGplusupdate-ca-certificatesRUN, rebased onto main and placed afteradduser, beforeUSER myuser. Empty arg is a no-op.This installs the CA into the system OpenSSL store, which the aiohttp path in the issue reads. Clients pinned to certifi (httpx, requests) or gRPC bundled roots would still need
SSL_CERT_FILE/REQUESTS_CA_BUNDLE/GRPC_DEFAULT_SSL_ROOTS_FILE_PATH. Those change trust for every deploy, so they are out of scope here.Testing Plan
Unit Tests:
17 passed in 0.22s.
With
src/google/adk/cli/cli_deploy.pyreverted to b018062 (git checkout b0180620 -- src/google/adk/cli/cli_deploy.py), same command: 5 failed (test_dockerfile_template_consumes_agent_gateway_root_certificatesand all 4test_to_cloud_run_happy_pathparams, on the ARG assertion), 12 passed. Restored: 17 passed.Manual End-to-End (E2E) Tests:
Not re-run here (needs Cloud Build and an Agent Gateway). KenTandrian tested the same snippet via #6428: #6427 (comment)
Additional context
Claimed on the issue: #6427 (comment)
Checklist