https://prefect.io logo
Title
j

Joël Luijmes

03/08/2023, 2:51 PM
Hi there, I have various prefect flows which have need for different resources (sidecar container such as cloud_sql_proxy, and different secrets). In Prefect 1, I just created job-template which was shared for all flows. With Prefect Orion, I would like to do it bit differently, and have differentiation based on the flow. Meaning I only configure per flow the actual required resources. Right now I’m thinking of registering different blocks per flow, and just repeating the job-template. Does anyone have any ideas or suggestions how to achieve this with minimal duplication?
1
Would be cool if I can have some infra block which is dynamic. Like a base block containing the bulk of the job-template, but extendable such I can add various patches of yaml I need.
r

redsquare

03/08/2023, 3:15 PM
that is what we do, base template then patching via infra_overrides
🙌 1
driven from cookiecutter deployments that produce the necessary flow+deployment python files
j

Joël Luijmes

03/08/2023, 3:17 PM
Do you then have a different block for the different deployments? Or when building the deployment for a flow you add those overrides?
r

redsquare

03/08/2023, 3:17 PM
same base block
then overriding
r

redsquare

03/08/2023, 3:17 PM
yeah
exactly
j

Joël Luijmes

03/08/2023, 3:18 PM
Ah cool, that makes sense. Then I can just provide bunch of customizations with each respective flow.
Thanks!
👍 1
r

redsquare

03/08/2023, 3:19 PM
yup