Camilo Fernandez
06/01/2022, 1:02 PMAnna Geller
Camilo Fernandez
06/01/2022, 1:24 PMPREFECT__CLOUD__USE_LOCAL_SECRETS=false
which I'm struggling to change.
It even showed it had AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID set. But still couldn't get them to the KubernetesRun config.
Should I use image_pull_secret in the KubernetesRun config? or set agent.env in the Helm chart?
aws_secret_key_id = Secret("PREFECT__CONTEXT__SECRETS__AWS_ACCESS_KEY_ID").get()
aws_secret_access_key = Secret("PREFECT__CONTEXT__SECRETS__AWS_SECRET_ACCESS_KEY").get()
#aws_secret_key_id = Secret("AWS_SECRET_ACCESS_KEY").get() #<- This doesn't work
KubernetesRun(
job_template_path="job-template.yaml",
image="public.ecr.aws/1235/my-image:dev",
env=dict(AWS_ACCESS_KEY_ID=aws_secret_key_id, AWS_SECRET_ACCESS_KEY=aws_secret_access_key)
)
Anna Geller
Camilo Fernandez
06/01/2022, 1:34 PM