简体   繁体   English

如果更改项目名称,Google Container Registry 会面临哪些风险?

[英]What are the risks to Google Container Registry if the project name is changed?

I have a CI/CD pipeline configured where Google Cloud Build automatically builds containers from code pushed to a GitHub repo if tagged with a specific tag.我配置了一个 CI/CD 管道,其中 Google Cloud Build 自动从推送到 GitHub 存储库的代码构建容器(如果标记有特定标签)。 The containers are automatically deposited into Google Container Registry.容器会自动存放到 Google Container Registry 中。 Each container in the registry is tagged with a tag in the form us.gcr.io/project_name/container_name:tag_name注册表中的每个容器都以us.gcr.io/project_name/container_name:tag_name的形式标记

My question is if I change the project name, how will this affect the containers currently sitting in Google Container Registry that I have already tagged with the current project name?我的问题是,如果我更改项目名称,这将如何影响我已经用当前项目名称标记的当前位于 Google Container Registry 中的容器? Do I need to change the tag on each container with the intended project name before updating the project name itself?在更新项目名称本身之前,我是否需要用预期的项目名称更改每个容器上的标签? Is this handled automatically by GCP?这是由 GCP 自动处理的吗?

Registries in Container Registry are named by the host and project ID . Container Registry 中的注册表由主机和项目 ID 命名 To work with images (for example push, pull, delete) identify the image using the following format:要使用图像(例如推送、拉取、删除),请使用以下格式识别图像:

[HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]

Or [HOSTNAME]/[PROJECT-ID]/[IMAGE]@[IMAGE_DIGEST]或者 [HOSTNAME]/[PROJECT-ID]/[IMAGE]@[IMAGE_DIGEST]

Even if you change your PROJECT NAME, PROJECT ID can't be changed, because Project ID: a unique identifier for your project, composed of the project name and a randomly assigned number .即使你改变了你的PROJECT NAME,PROJECT ID也不能改变,因为Project ID:你的项目的唯一标识,由项目名称和一个随机分配的数字组成 So your images keep with the same registries in Container Registry.因此,您的映像会保留在 Container Registry 中的相同注册表中。 us.gcr.io/project_id/container_name:tag_name us.gcr.io/project_id/container_name:tag_name

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM