I'm actually using Cloud Build & Cloud Run in my project.
For the CI/CD, I use a cloudbuild.yaml file to define the steps I need to perform to deploy my new revision of Cloud Run.
After several issue on traffic management, I had to add to my cloudbuild file a step to specify that the traffic should be set to 100% to the latest built revision. That is weird but it is working so... be it 👍
cloudbuild.yaml step
# Allocate 100% of the traffic to that new revision
- name: gcr.io/cloud-builders/gcloud
args: ['run', 'services', 'update-traffic', '${_APP_NAME}', '--to-revisions=LATEST=100', '--platform', 'gke', '--cluster', 'xxxxxx', '--cluster-location', 'xxxxxxxxxxx', '--namespace', 'xxxxxxxx']
Unfortunetely, event if the traffic is well set, it always keeps "alive" the old revision 👎 .
What is strange is that it is not doing it when I'm doing it remotely using gcloud command.
Hi everyone,
I'm actually using Cloud Build & Cloud Run in my project.
For the CI/CD, I use a
cloudbuild.yaml
file to define the steps I need to perform to deploy my new revision of Cloud Run.After several issue on traffic management, I had to add to my cloudbuild file a step to specify that the traffic should be set to 100% to the latest built revision. That is weird but it is working so... be it 👍
cloudbuild.yaml step
Unfortunetely, event if the traffic is well set, it always keeps "alive" the old revision 👎 .
What is strange is that it is not doing it when I'm doing it remotely using gcloud command.
Did you already have that issue in the past ?
Thanks for the help :)