So I've followed the steps in
https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-functions to deploy ESPv2 as a managed Cloud Run service, including the steps to update the image using the gcloud_build_image script. All that is working fine although a bit convoluted. Now with runtime release 2.13 available, I'm looking for best practises to deploy that while keeping my endpoint up and running.
I am able to do this by following these steps assuming 2.12 is already deployed and happily serving requests:
- Deploy new image using something like "gcloud run deploy myservice --image="gcr.io/endpoints-release/endpoints-runtime-serverless:2.13.0" --allow-unauthenticated --platform managed --project=abc --set-env-vars=ENDPOINTS_SERVICE_NAME=myservice". Key here is to add the ENDPOINTS_SERVICE_NAME variable.
- Now I basically repeat the steps in the wiki above, but from "Building a new ESPv2 Beta image". When deploying the image this time, I make sure to add "--remove-env-vars=ENDPOINTS_SERVICE_NAME" to have it use the ESP config tattooed onto the image again.
Is this the preferred way to handle this?. There are now an awful lot of steps I feel to keep this "API gateway" up and running with all its moving parts.
Thanks in advance for any insights!
Hans