我正在尝试重新部署到容器应用程序中,直到昨晚为止,即使使用 github 操作,它也能完美运行。
今天,当我再次进行更新时,我可以看到某些地方发生了变化,这使得我的 github 操作部署(部署期间失败),而且现在 docker 推送到容器注册表和手动部署也不起作用。来自 github 的错误:
ERROR: (FailedIdentityOperation) Identity operation for resource '/subscriptions/SUB_ID/resourceGroups/NAME/providers/Microsoft.App/containerApps/backend-prod-app' failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response: '{"error":{"code":"BadRequest","message":"DelegatedResources dictionary cannot be empty unless resource has existing delegations."}}'.'.
当我尝试重新部署新版本时显示的错误消息
Failed to deploy new revision: Identity operation for resource '/subscriptions/SUBS_ID/resourceGroups/NAME/prov….. prod-app' failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response: '["error":("code" :"BadRequest", "message". "Client not permitted to perform resource delegation. Requests containing delegated Resources must be made with a valid Microsoft 1st-party app credential."))'.
我什至从头开始重新创建了新的容器应用程序,但问题似乎仍然存在。
服务,即 github CICD 操作等似乎又恢复正常了。
同时,我的中间解决方案是通过 az cli 手动更新集群:
az containerapp update --name APP_NAME --resource-group RG_NAME --image REGISTRY:TAG