Is there a way to define an execution-wide environ...
# ask-the-community
r
Is there a way to define an execution-wide environment variable when creating an execution (either via
flytectl
or flyte remote)? We'd like to inject some metadata from CI into the workflow application code (in a way that labels or annotations don't immediately solve) We could theoretically hack around this by using the downward API to mount
metadata.labels
or
metadata.annotations
as a volume, but being able to directly set env var(s) seems more idiomatic/breaks fewer abstractions. Curious if anyone else has had to deal with this
d
Hey @Rahul Mehta, so I currently added (not yet merged) the option to set environment variables on the
ExecutionConfig
of a workflow execution. This would allow a user to set envvars during workflow execution (UI / flytectl / pyflyte) or on the launchplan. These envvars are then set on every container that Flyte starts. Does this sound like what you're looking for? Currently, these PRs won't be merged for awhile, but maybe it makes sense to refactor this bit out and get it merged relatively quickly.
r
I think that's just the ticket!
We have a workaround right now that relies on parsing the
FLYTE_INTERNAL_VERSION
env var but this sounds like it's exactly it
153 Views