GKE cluster中的定时任务解决方案(二)
mrdulin opened this issue · comments
official_dulin commented
架构图
流程简介
GraphQL
API部署在GKE
中的资源类型是Deployment
,daily report部署在GKE
中的资源类型是CronJob
,该CronJob
的功能是定时publish
一个消息到Cloud Pub/Sub
,进而触发daily report Cloud Function
,执行数据库查询和相关逻辑,得到需要的数据,然后调用send email Cloud Function
,该Cloud Function
调用SendGrid
邮件服务发送邮件给终端用户。