Hello, I'm trying to pass certain variables to my ...
# ask-the-community
n
Hello, I'm trying to pass certain variables to my Flyte workers (for example, data warehouse credentials, among others). I need to pass these variables as environment variables to my workflows. How can I achieve this? Can't figure it out from the documentation. Thanks
k
We prefer that you use secrets. Env variables can be passed to but that is not secure
k
you can use
pyflyte run --env …
n
Thanks for the help. I created secrets with:
kubectl create secret -n <project>-<domain> <secret-name> --from-literal=<KEY1>=<VAL1> --from-literal=<KEY2>=<VAL2>
. Using
kubectl get -n <project>-<domain> secrets/<secret-name>
I can see the secret was created successfully with the correct values. But upon including them on my task, e.g. :
Copy code
@task(secret_requests=[Secret(group=<secret-name>, key=<KEY1>)])
def task1...
i get a
max number of system retry attempts [11/10] exausted...
, am I doing something incorrect here?
k
do you see any other error from the pod?
n
I think the pod does not even launch in the first place.
149 Views