Hello! I am attempting to override the default memory/cpu limit/requests for deployments that are created by a flow. Today we are using the infra_overrides args in order to get our image to populate when the K8s worker spins up pods, and that seems to work just fine. But, it does not appear to be changing the resource allocation out of the default values.
The deployment config created through build_from_flow shows up in the as the photo below. Is infra_overrides the correct method of setting these on a per deployment basis or is there another value we need to be setting in order to manage resources more effectively in the pods spun up?
✅ 1
a
alex
02/12/2024, 5:34 PM
Hey @Dane Linsky! Have you added variables to the base job template for your Kubernetes work pool that will allow deployments to provide custom resources values? The default base job template for Kubernetes work pools don’t have such variables, but you can refer to this documentation for how to add them: https://prefecthq.github.io/prefect-kubernetes/worker/
🙌 1
d
Dane Linsky
02/12/2024, 5:58 PM
Ah I tracked it down, thank you @alex!
🙌 1
m
Mike O'Connor
02/13/2024, 1:48 PM
jumping onto this thread with a related question. Is it possible to have variables such as these be provided at flow run time?
The use case I have is sometimes a flow may need more or less memory depending on how it is used.
Currently we tend to just wrap this in multiple deployments, but it's inconvenient to do this.
a
alex
02/15/2024, 1:01 AM
That isn’t possible today, but it is on our roadmap!
🙌 1
m
Mike O'Connor
02/16/2024, 12:22 PM
thanks for the reply - definitely interested in that
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.