Hello all, I am new to Prefect and having a hard t...
# prefect-server
k
Hello all, I am new to Prefect and having a hard time getting my github access token picked up when running a flow on the kubernetes agent. I have set the env variable
PREFECT__CONTEXT__SECRETS__GITHUB_ACCESS_TOKEN
on the agent pod but I keep getting this error
ValueError('Local Secret "GITHUB_ACCESS_TOKEN" was not found.')
. Does the default secret not get created when using the kubernetes agent?
m
Hello! Did you pass a secret to the agent using --env flag?
k
Thanks for the reply! No I did not, is the only way to get them to the agent to use
--env
when starting the agent? The docs seem a vague but I will try that
I am deploying via a helm template and am setting the
env
variables there. It seems they make it to the pod but I guess do not get forwarded to the flow run environment?
m
Setting env with
PREFECT__CONTEXT__SECRETS__GITHUB_ACCESS_TOKEN
should work, but I would check setting env variable with --env flag. If you'll not figure this out, please open the issue, because it sounds like a bug.
k
just to circle back.. i was able to fix it by setting the
env
property in the
run_config
thanks for the suggestion!
m
I'm glad it worked for you!