Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

agents-cli deploy has no way to pass CMEK (encryption_spec) for Agent Runtime, blocking deploys under constraints/gcp.restrictNonCmekServices

未关闭
#83 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
google-cloud, python
领域
cli, cloud

调研方向

从 google/agents/cli/deploy/cmd_deploy.py 和 agent_runtime.py 开始,然后检查 vertexai.agent_engines._agent_engines.create() 的 encryption_spec 参数。针对强制执行 constraints/gcp.restrictNonCmekServices 的项目运行复现命令,并检查 agents-cli deploy --help。当 agent_runtime deploy 能够接收 KMS 加密密钥并满足该政策时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

What is your feature suggestion?
Description

Deploying as ADK Agent to Agent Runtime(agents-cli deploy --deployment-target agent_runtime) fails in any GCP project that enforces the org policy constraints/gcp.restrictNonCmekServices, because the CLI never passes a KMS encryption key to the undersying create call.

Reproduce

agents-cli scaffold create test-a2a-agent --agent adk --deployment-target agent_runtime --region us-central1 --cicd-runner skip
cd test-a2a-agent && agents-cli install
agents-cli deploy --project --region us-central1 --no-confirm-project

Observed Error

Error: Agent Runtime create request failed — 400 FAILED_PRECONDITION: The request has violated one or more Org Policies: violations {
type: "constraints/gcp.restrictNonCmekServices"
subject: "orgpolicy:projects/"
description: "Constraint constraints/gcp.restrictNonCmekServices violated for projects/<project> attempting to create a resource without specifying a KMS CryptoKey."
}

Root cause
  • agents-cli deploy --help exposes flags for --network-attachment, --service-account, --agent-gateway-*, etc., but has no --kms-key / --encryption-spec flag.
  • The underlying SDK (vertexai.agent_engines._agent_engines.create(), in google_cloud_aiplatform==1.165.1 as vendored by the CLI) already accepts an encryption_spec: Optional[aip_types.EncryptionSpec] parameter — the capability exists in the SDK layer, it's just never threaded through google/agents/cli/deploy/cmd_deploy.py / agent_runtime.py.
Requested fix

Add a --kms-key (or --encryption-spec) flag to agents-cli deploy for the agent_runtime target

What will this enable you to do?

Any organization that mandates CMEK for Vertex AI resources (a common enterprise/regulated-industry policy) cannot deploy to Agent Runtime via agents-cli at all — there is no workaround short of bypassing the CLI and calling the

Additional context

No response

主要语言
Python
星标
6k
派生
670
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google/agents-cli 的其他 Issue

查看 google/agents-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。