Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud run deploy promote 100% traffic

I'm deploying my app in the following way:

gcloud run deploy ${{ secrets.SERVICE_NAME }} \
  --source $(pwd) \
  --region us-central1 \
  --allow-unauthenticated \
  --platform managed

And it works fine.

However, I manually changed my service to serve the traffic 100%; now, every time that I deploy, the latest deployment doesn't get promoted, and it still keeps serving the old one.

To revert this behavior, what do I do, pass a flag or something else?

like image 459
Rodrigo Avatar asked Dec 14 '25 13:12

Rodrigo


2 Answers

Yes, try setting this:

gcloud run services update-traffic SERVICE --to-latest

Take a look at Send all traffic to the latest revision

like image 156
Wesley LeMahieu Avatar answered Dec 16 '25 21:12

Wesley LeMahieu


Or, update the YAML file. Look for the traffic entry and remove it.

It would be something like:

  traffic:
  - revisionName: servicename-00055-9bw

After you save, your YAML will have

  traffic:
  - percent: 100
    latestRevision: true

This means, every new revision will automatically serve full traffic.

Reference: Sending 100% traffic to latest Cloud Run revision automatically

like image 38
Vedant Agarwala Avatar answered Dec 16 '25 23:12

Vedant Agarwala



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!