I want to inject secrets as env vars into my raw c...
# ask-the-community
f
I want to inject secrets as env vars into my raw container and thought I can do it via secret_requests: https://github.com/flyteorg/flytekit/pull/1307 But I was surprised that the injected env var is named prefix+group+key, the prefix I can set to empty, the group obviously not. This essentially forces me to create multiple k8s secrets (secret name becomes group) for each env var that I need injected that has a different prefix. So it seems it was not intended to be used this way (that the key becomes the env var name)? Point in case I need to inject
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
and thought I can get the correct ones by specifying the group (k8s secret name). But how it currently works I would need to use
AWS
as group name and hence can have only one k8s secret with that name....
Hm.. really seems like flyte secrets are not meant to behave like k8s secrets directly... I don't need to retrieve the secrets in Python, just have them injected as env vars just like in k8s: https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data But how can I specify this for my ContainerTask?
121 Views