使用 Breakglass (Cloud Run)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页面介绍了如何使用 Breakglass 在 Cloud Run 上部署或传送违反了 Binary Authorization 政策的映像。
在开始之前,请设置 Binary Authorization for Cloud Run,并部署或传送映像。
如需使用 Breakglass,请按以下步骤操作。
控制台
在尝试部署或传送违反了 Binary Authorization 政策的映像时,Cloud Run 会显示一条错误消息并附带有一个 Breakglass 按钮。
如需绕过 Binary Authorization 强制执行并部署或传送违反了政策的容器,请执行以下操作:
转到 Google Cloud Console 中的“Cloud Run 服务”页面。
转到“Cloud Run 服务”
点击要为其使用 Breakglass 的服务的名称。
点击 Breakglass 按钮。在显示的对话框中,执行以下操作:
输入“Breakglass 理由”。
如需绕过政策并部署映像,请点击 Breakglass 按钮。
gcloud
如需绕过 Binary Authorization 强制执行并部署或提供违反政策的容器,请输入以下命令:
gcloud run services update SERVICE_NAME --breakglass=JUSTIFICATION
将 JUSTIFICATION 替换为要使用 Breakglass 的理由。
您现在可以在 Cloud Audit Logs 中查看 Breakglass 事件。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-09-15。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或示例代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]