Open nick-catalist opened 9 months ago
I ended up moving to Cloud Run v2 API which handles this much better. I would encourage anyone looking here to do the same.
That said, the docs should still probably not mislead those still on v1 :)
This is defined upstream, the same comment exists for both annotations:
I'm not exactly sure why they do it, but I think we apply all the docs truthfully.
What happened?
https://www.pulumi.com/registry/packages/gcp/api-docs/cloudrun/service/
The docs describe how to set autoscaling via knative annotations in a Cloud Run service. They claim that this should be in the top level "metadata" field on the service, of type ServiceMetadataArgs:
However, this is incorrect, and setting this annotation will not set autoscaling on your Cloud Run service. It's easy to reproduce this, just create a cloud run via Pulumi using this recommendation. It will indeed set an annotation on the service-level metadata, but you can see in the GCP console that the "min instances" is unset. If you set min instances via the GCP console, you'll see that this annotation actually gets set at
spec.template.metadata
instead.Example
Output of
pulumi about
N/A
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).