google-cloud-platform - 在公共 Cloud Run 服务上使用 Pub/Sub
问题描述
根据 Cloud Run 的“ Authenticating service-to-service ”文档,要在服务上使用Pub/Sub和Cloud Scheduler,必须禁用未经身份验证的访问,因为它们依赖 HTTP 调用,因为 Cloud Run 服务的零扩展能力。
我的服务允许内部和负载均衡器流量,并且必须对前端客户端公开可用,但它们还必须能够通过 Pub/Sub 私下相互通信。
有没有办法做到这一点?为使用 Pub/Sub 创建单独的私有服务感觉不自然。
解决方案
It's a missing piece. You can't plug in your VPC PubSub push subscription and Cloud Scheduler (but also Cloud Task, Cloud Build, Workflows,...). I asked Google Cloud few months ago, and it should be fixed by a new network features, soon. At least in 2021!
So, in your case, if your Cloud Run service is accessible from the public internet through a Load Balancer, you can use this public endpoint to call the path that you want on your service and thus perform the process.
If your Cloud Run in only accessible from ingress=internal, you can't for now.
推荐阅读
- snowflake-cloud-data-platform - 未创建雪花 odbc 日志文件
- javascript - three.js 在占位符网格/世界坐标中创建文本?
- javascript - 获取选择输入的价格
- sql - 如何使用 CriteriaBuilder 实现此 SQL 来构建谓词?
- python-3.x - 如何从OpenCV python中的图片中删除背景
- android - 数据源类是否应该负责合并来自 2 个 API 调用的数据?
- javascript - Chart.js(自定义堆叠条的工具提示以表示每个堆叠数据)
- python - 在 Python 中解析不一致的 XML 文件以使用 Django 将其上传到数据库
- filter - Chilkat 仅从根目录解压缩文件
- jquery - 如何改进为 jQuery 中的图像轮播编写的代码?