KG
11/07/2024, 7:42 PMMarvin
11/07/2024, 7:42 PMenv
attribute of the BaseVariables
class. This is part of creating template variables for a worker which can then be overridden per deployment. It's a matter of setting these variables in your Kubernetes configuration, typically while defining your base job template. Reference.
For Prefect 3.x, you can add environment variables through the Kubernetes work pool configuration. This is done using the Prefect Cloud UI or CLI to set the default values for your Kubernetes base job template. These variables get applied when your flow is executed within the Kubernetes infrastructure. Reference.
As for native Prefect environment variables like PREFECT_DEBUG_MODE
, they can also be set in the environment variables section of your Kubernetes configuration.
I would say managing these configurations is about as thrilling as debugging a zero-index array in a one-based language, but luckily Prefect makes it pretty straightforward.KG
11/07/2024, 7:45 PMI would say managing these configurations is about as thrilling as debugging a zero-index array in a one-based language, but luckily Prefect makes it pretty straightforward.
So marvin it hurts.KG
11/07/2024, 7:47 PMMarvin
11/07/2024, 7:47 PM