Hi there! Is there an environment variable that can be set on Kubernetes Agents in order to populate environment variables for flow runs managed by that agent? I see in the docs that you can run:
Thank you @Kyle Moon-Wright... this is exactly the kind of thing I had in mind:
Any lowercase Prefect configuration key can be set by environment variable. In order to do so, prefix the variable with
PREFECT__
and use two underscores (
__
) to separate each part of the key.
For example, if you set
PREFECT__TASKS__DEFAULTS__MAX_RETRIES=4
, then
prefect.config.tasks.defaults.max_retries == 4
.
But it doesn't look like the flow environment variables are ever set like
prefect.config.agent.env
Billy McMonagle
01/11/2021, 7:40 PM
I probably just need to get more comfortable with helm templating and do the
--env Key=VALUE
thing.
k
Kyle Moon-Wright
01/11/2021, 7:49 PM
hmm, this could be a feature request as I believe environment variables defined like
PREFECT__TASKS__DEFAULTS__MAX_RETRIES=4
will apply to all your flows globally, rather than be delegated to an individual Agent, whose env vars would need to be configured independently by one of the means mentioned above.
Kyle Moon-Wright
01/11/2021, 7:49 PM
I’ll keep thinking on this though! There may be a hidden way I’m not thinking of…
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.