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?
Yes, try setting this:
gcloud run services update-traffic SERVICE --to-latest
Take a look at Send all traffic to the latest revision
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With