我正在通过firebase-cli部署一个函数,该函数具有一个与文档相同的minInstances param。不过,现在有一个用户提示来确认估计费用:
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudfunctions.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
i functions: preparing . directory for uploading...
i functions: packaged . (230.66 KB) for uploading
⚠ functions: The following functions have reserved minimum instances. This will reduce the frequency of cold starts but increases the minimum cost. You will be charged for the memory allocation and a fraction of the CPU allocation of instances while they are idle.
testFunctionInstances(us-central1): 2 instances, 1GB of memory each
With these options, your minimum bill will be $17.22 in a 30-day month
? Would you like to proceed with deployment? (y/N) 这个新提示符正在破坏我们当前的部署设置。我们目前正在研究如何使用firebase-cli在“普通”状态(即没有额外的运行时参数)部署函数,然后继续使用gcloud beta来使用新的运行时参数更新现有函数的离散列表;然而,这给CI/CD增加了新的复杂性。
是否有办法抑制与财务估计有关的这类信息?
发布于 2021-11-09 17:51:14
问题中的警告只在估计价格上升时才出现--在一次手动部署之后,如果minInstances保持稳定,就不会立即出现。
尽管如此,您可以将--force标志添加到deploy中,这将抑制所有提示。请注意,这包括提示删除部署中缺少的函数,因此在删除函数时要小心。
https://stackoverflow.com/questions/69902513
复制相似问题