fix(cli): consume AGENT_GATEWAY_ROOT_CERTIFICATES in deploy Dockerfile#6428
Open
Solaris-star wants to merge 2 commits into
Open
fix(cli): consume AGENT_GATEWAY_ROOT_CERTIFICATES in deploy Dockerfile#6428Solaris-star wants to merge 2 commits into
Solaris-star wants to merge 2 commits into
Conversation
Cloud Build passes the Agent Gateway root CA as a build-arg, but the generated Dockerfile never declared it, so TLS interception certs were not installed and outbound HTTPS/gRPC failed verification. Fixes google#6427 Signed-off-by: Solaris-star <820622658@qq.com>
Collaborator
|
Hi @Solaris-star , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
Collaborator
|
Hi @sasha-gitg , can you please review this. LGTM |
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):
2. Or, if no issue exists, describe the change:
Problem:
adk deploy agent_engine(and the shared Dockerfile template used by Cloud Run / GKE deploy paths) never declared or consumed theAGENT_GATEWAY_ROOT_CERTIFICATESbuild-arg that Cloud Build passes for Agent Gateway TLS interception. Outbound HTTPS/gRPC through the gateway then fails withCERTIFICATE_VERIFY_FAILED.Solution:
Add an optional
ARG AGENT_GATEWAY_ROOT_CERTIFICATES+ root-onlyRUNthat writes the cert into/usr/local/share/ca-certificates/and runsupdate-ca-certificatesbefore switching to the non-root user. Empty arg remains a no-op.Testing Plan
Unit Tests:
Extended
tests/unittests/cli/utils/test_cli_deploy_to_cloud_run.pyassertions forARG AGENT_GATEWAY_ROOT_CERTIFICATESandupdate-ca-certificates. Also ran a lightweight template-format check confirming the ARG block is emitted beforeUSER myuser. Full package pytest not run in this environment (host missing project deps); CI should cover deploy unit tests.Manual End-to-End (E2E) Tests:
Not run here (requires Cloud Build + Agent Gateway). The change is limited to Dockerfile generation; when Cloud Build passes the build-arg it is now consumed instead of warning "build-args were not consumed".
Checklist
Additional context
Suggested Dockerfile snippet from the issue is followed; install runs as root before
USER myuser.