Hi! Is there a way we can store some metadata when...
# ask-the-community
g
Hi! Is there a way we can store some metadata when
flytectl register file
? e.g. some k-v pairs like env vars. The intention of this is we build image containers for the workflow code, and we have to store some env vars and use this data when running the workflow. However we cannot populate them when we build the image. Currently we put them in version_id, I wonder is there a better way to do so? Thanks!
k
could you add env to task decorator?
Copy code
@task(
    environment={"FLYTE_INTERNAL_IMAGE": "pingsutw/flytekit:0.16.0"}
)
def t1():
    ...
k
also labels
g
@Ketan (kumare3) I found an example of labels, but can we explicitly add this in the workflow annotation? We don't control this part of code, we can only control the annotation
Thanks @Kevin Su ! Unfortunately we hope to put this info as workflow or launch plan level
If there is @workflow (env={k1=v1, k2=v2}) that would be great
you should be able to add envs to LP, but currently envs is not exposed in the API. mind open a ticket here? [flyte-bug]
k
we’ll add that
g
We are the platform team to provide Flyte to our internal users, so we cannot require users to add the LP piece of code. All our workflows are implemented as the example. If we can inject env vars from the @workflow or from the workflow registration, that would be awesome.