限制Artifact Registry位置而不设置组织如何做

huangapple go评论55阅读模式
英文:

How to restrict Artifact Registry locations without setting an organization

问题

我想使用Google的Artifact注册表来保存Cloud Run生成的构建产物,这些构建产物来自云存储库的提交。当我按照默认设置进行设置时,注册表使用多区域存储桶存储,这会导致流量复制费用。

我希望Artifact注册表使用单一区域以避免复制。

我发现可以在组织级别上限制位置,但当我尝试为不属于组织的项目执行此操作时,我收到以下消息:

您需要选择组织下的资源来管理策略。

是否有方法说服Artifact注册表在存储代码存储库生成的构建产物时使用单一区域?我知道如何手动上传包含Docker容器等构建产物到单一区域的Artifact注册表目录,但我想与云构建一起使用它。

英文:

I would like to use Google's Artifact registry to keep build artifacts from Cloud Run from cloud repo commits. When I set this up by default, the registry is using the multi-region bucket storage, which leads to traffic replication charges.

I would like the Artifact registry to use a single region to avoid replication.

I found an option to restrict the locations of Artifact registry at the level of the organization, but when I'm trying to do this for a project that doesn't belong to an organization, I get:

You need to select a resource under an organisation to manage policies.

Is there a way to convince Artifact registry to use single regions when storing build artifacts from the code repository? I know how to manually upload the artifacts with docker containers, etc. to single-region Aritfact registry directories, but I'd like to use it together with the cloud build.

答案1

得分: 2

你可以在创建Artifact Registry存储库时选择一个地区(或者如果它是由Cloud Run创建的,你可以在Cloud Run中进行配置)。

限制位置不会更改创建Artifact Registry存储库的地区,只会在尝试在受限制的地区创建Artifact Registry存储库时产生错误。

英文:

You can choose a region when you create the Artifact Registry repository (or if it is created by cloud run, you can configure this in cloud run).

Restricting the locations won't change the region the Artifact Registry repository is created in, it will just give an error when attempting to create an Artifact Registry repository in the restricted region.

huangapple
  • 本文由 发表于 2023年6月1日 03:15:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76376611.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定