英文:
GCP Cloud Run - Retrieve all revisions not serving traffic
问题
我一直在徒劳地尝试获取所有未提供流量的云运行修订版本,以便我可以对它们进行修剪。文档似乎并没有提供太多帮助。这是我拥有的内容:
gcloud run revisions list
--region <region>
--service <service>
--filter="status.conditions.type['Active'].status:'True'"
--sort-by="~metadata.creationTimestamp"
我在yaml中没有看到任何指示修订版本目前正在提供流量的内容,以便我可以在云控制台中进行过滤,除非在UI中。我在这里漏掉了什么?
英文:
I've been trying in vain to get all cloud run revisions not serving traffic so I can prune them. The docs don't seem to provide much help. Here's what I have:
gcloud run revisions list
--region <region>
--service <service>
--filter="status.conditions.type['Active'].status:'True'"
--sort-by="~metadata.creationTimestamp"
I haven't seen anything the yaml that indicates a revision is currently serving traffic that I can filter on in the cloud console except in the ui. What am I missing here?
答案1
得分: 1
你可以尝试:
gcloud run revisions list
--filter="status.conditions.type:Active AND status.conditions.status:'False'"
--format='value(metadata.name)'
然后指定`region`。
或者:
gcloud run revisions list \
--region
--service
--filter="status.conditions.type:Active AND status.conditions.status:'False'" \
--format='value(metadata.name)'
英文:
You can probably try:
gcloud run revisions list \
--filter="status.conditions.type:Active AND status.conditions.status:'False'" \
--format='value(metadata.name)'
Then specify the region
Or:
gcloud run revisions list \
--region <region> \
--service <service name> \
--filter="status.conditions.type:Active AND status.conditions.status:'False'" \
--format='value(metadata.name)'
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论