Google Container Registry 改项目名会有什么风险?
What are the risks to Google Container Registry if the project name is changed?
我配置了一个 CI/CD 管道,其中 Google Cloud Build 自动从推送到 GitHub 存储库的代码构建容器(如果标记有特定标签)。容器会自动存放到 Google Container Registry 中。注册表中的每个容器都标有 us.gcr.io/project_name/container_name:tag_name
形式的标签
我的问题是,如果我更改项目名称,这将如何影响当前位于 Google Container Registry 中且我已使用当前项目名称标记的容器?在更新项目名称本身之前,我是否需要用预期的项目名称更改每个容器上的标签?这是由 GCP 自动处理的吗?
Registries in Container Registry are named by the host and project ID。要使用图像(例如推、拉、删除),请使用以下格式识别图像:
[HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
或[HOSTNAME]/[PROJECT-ID]/[IMAGE]@[IMAGE_DIGEST]
即使您更改了 PROJECT NAME,PROJECT ID 也无法更改,因为 Project ID: a unique identifier for your project, composed of the project name and a randomly assigned number。因此,您的映像会保留在 Container Registry 中的相同注册表中。 us.gcr.io/project_id/container_name:tag_name
我配置了一个 CI/CD 管道,其中 Google Cloud Build 自动从推送到 GitHub 存储库的代码构建容器(如果标记有特定标签)。容器会自动存放到 Google Container Registry 中。注册表中的每个容器都标有 us.gcr.io/project_name/container_name:tag_name
我的问题是,如果我更改项目名称,这将如何影响当前位于 Google Container Registry 中且我已使用当前项目名称标记的容器?在更新项目名称本身之前,我是否需要用预期的项目名称更改每个容器上的标签?这是由 GCP 自动处理的吗?
Registries in Container Registry are named by the host and project ID。要使用图像(例如推、拉、删除),请使用以下格式识别图像:
[HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
或[HOSTNAME]/[PROJECT-ID]/[IMAGE]@[IMAGE_DIGEST]
即使您更改了 PROJECT NAME,PROJECT ID 也无法更改,因为 Project ID: a unique identifier for your project, composed of the project name and a randomly assigned number。因此,您的映像会保留在 Container Registry 中的相同注册表中。 us.gcr.io/project_id/container_name:tag_name