google-app-engine - 我可以从 Google Cloud Storage artifacts 存储桶中删除容器镜像吗?

标签 google-app-engine google-cloud-platform google-cloud-storage google-cloud-build

我有一个 Google App Engine 应用程序,它连接到 Google Cloud Storage。

我注意到存储的数据量高得不合理(4.01 GB,应该是 100MB 左右)。

所以,我查看了每个bucket的存储量,发现有一个自动创建的bucket叫做us.artificats.那占据了大部分空间。

我一看,里面只有一个文件夹:containers/images/ .

从我用 Google 搜索的内容来看,这些图像似乎来自 Google Cloud Build。

我的问题是,我可以在不影响整个应用程序的情况下删除它们吗?

最佳答案

我通过应用删除规则解决了这个问题。这是如何做到的:

  • 在 Google Cloud 控制台中打开项目
  • 打开存储管理(例如搜索“存储”)。
  • 在浏览器选项卡中,选择容器 us.artifacts....
  • 现在,打开生命周期部分。你应该看到类似:

  • enter image description here
  • 单击添加规则并提供以下条件:
  • 在操作中,选择删除对象
  • 在条件中,选择年龄并输入例如 3 天

  • 点击创建确认创建

  • 现在所有超过 3 天的对象都将被自动删除。 Google Cloud 可能需要几分钟时间才能应用此新规则。

    关于google-app-engine - 我可以从 Google Cloud Storage artifacts 存储桶中删除容器镜像吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59937542/

    相关文章:

    python - 如何改变 ndb 重复属性?

    python - 无法理解应用引擎中的游标

    python - 使用 python 的 GAE 灵活和 Stackriver 日志严重性级别

    google-cloud-platform - Composer 需要分支名称

    php - 使用AppEngine创建云存储桶

    google-cloud-storage - gsutil 复制到存储失败

    google-app-engine - 谷歌应用引擎 : local testing a simple hello world

    python - GAE "No module named urllib"

    ssh - gcloud ssh -- 没有可用的受支持的身份验证方法(服务器发送 : publickey)

    google-cloud-storage - 如何等待gcsfuse写入(刷新)到GCS存储桶?