Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure CPU-allocation, the run.googleapis.com/cpu-throttling boolean in Cloud Run #173

Open
antont opened this issue Feb 5, 2024 · 2 comments
Labels
waiting for customer response Issue is on hold awaiting more information from OP

Comments

@antont
Copy link

antont commented Feb 5, 2024

Hi, is it possible to somehow configure the option that Cloud Run has for CPU allocation?

It's like this in the Run YAML:

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: SERVICE
spec:
  template:
    metadata:
      annotations:
        run.googleapis.com/cpu-throttling: 'BOOLEAN'
      name: REVISION

where the bool is:

BOOLEAN with true to set CPU allocation only during request processing, or false to set CPU to always allocated.

That's from https://cloud.google.com/run/docs/configuring/cpu-allocation#yaml

The Python lib here has many related options, such as cpu min-instances, and a way to set labels, but that annotations part is not mentioned in the docs, https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.options#firebase_functions.options.EventHandlerOptions

@antont
Copy link
Author

antont commented Feb 5, 2024

Oh I think it's actually possible to set preserve_external_changes to true and then edit the autodeployed YAML manually, we'll go with this now.

Update: we failed doing this so far, though, so hints are welcome..

@exaby73
Copy link
Contributor

exaby73 commented Feb 12, 2024

What sort of configuration options could be added here? Could you give me an example of a use case where you'd need to edit it?

@exaby73 exaby73 added the waiting for customer response Issue is on hold awaiting more information from OP label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for customer response Issue is on hold awaiting more information from OP
Projects
None yet
Development

No branches or pull requests

2 participants