I am trying to deploy a new revision to Cloud Run via a CI/CD job and immediately start serving 100% of the traffic to the new revision.
This service is not customer facing and we do not need canary deployments or traffic splitting.
Currently the image is build in gitlab ci pipeline and published gcr. The next step is a gcloud run deploy
command. The command is working just fine, I get a new revision. However 0% of the traffic is served to this revision, and I can't for the life of me figure out how to manage that programatically.
- I have read the FAQ here: https://github.com/ahmetb/cloud-run-faq#serving-traffic
- I have read the contents of
gcloud run deploy --help
The only relevant piece of information I can find is this from the FAQ:
However, Cloud Run (currently) only supports serving traffic from the last healthy revision of your service. Therefore, it currently does not support revision based traffic splitting and canary deployments.
But it seems outdated, since I can currently split traffic between revisions manually via the UI. Any clarification would be greatly appreciated. Thank you!