我希望在 Google 容器注册表上更新我的映像后能够自动更新我的 Google Cloud Run 服务。
我需要基于同一映像(其标签为 :latest )更新多个 Cloud Run 服务,因此我希望这能起作用。
# build & push the container image
- name: "gcr.io/kaniko-project/executor:latest"
args: ["--cache=true", "--cache-ttl=48h", "--destination=gcr.io/project/titan:latest"]
Run Code Online (Sandbox Code Playgroud)
目前,我的 titan 映像已更新,但没有新的修订版部署到 Cloud Run。
当您将新映像推送到标签引用时,Google Cloud Run 不会自动部署修订版本。它有很多充分的理由\xe2\x80\x99t。
\n\n部署 Cloud Run 修订版时,它会计算图像引用的 sha256 哈希值。
\n\n因此,当您指定带有标签的容器映像时:latest
,Cloud Run 会使用其 sha256 引用来部署和扩展该服务修订版。当您更新:latest
标签以指向新映像时,Cloud Run 仍将使用之前的映像。否则,这将是一个危险而滑坡的局面。
如果您需要根据新镜像推送自动部署 Cloud Run 的新修订版,我推荐两种解决方案:
\n\n 归档时间: |
|
查看次数: |
2755 次 |
最近记录: |