Deepak Pilligundla
02/08/2024, 3:06 PMNate
02/08/2024, 3:12 PMNate
02/08/2024, 3:13 PMDeepak Pilligundla
02/08/2024, 3:26 PMNate
02/08/2024, 3:38 PMdeploy kubernetes secrets with prefect-workershmm i am not so sure what you mean by this - this is not a pattern I'm familiar with at a high level can you explain what you're trying to do?
Deepak Pilligundla
02/08/2024, 4:29 PMNate
02/08/2024, 4:30 PMprefect.yaml
would be for jobs that run on that cluster
can you explain why you need to reference k8s secrets in a prefect.yaml?Deepak Pilligundla
02/08/2024, 4:35 PMNorman Blakely
02/08/2024, 4:42 PMNorman Blakely
02/08/2024, 4:43 PMNorman Blakely
02/08/2024, 4:44 PMNate
02/08/2024, 5:00 PM.load
/ reference them as needed
for reference, you can refer to a secret in a prefect.yaml
like this
pull:
- prefect.deployments.steps.git_clone:
repository: <https://bitbucket.org/org/repo.git>
access_token: "{{ prefect.blocks.secret.bitbucket-token }}"
or load one in a flow like this
@flow
def foo():
assert Secret.load("my-secret-name").get() == "very-secret-value"
i'd note that in general we recommend passing the name of secret blocks to flows instead of their values
---
otherwise, the interesting thing about our steps like prefect.deployments.steps.git_clone
is that they're just fully qualified function names
so if you can write a python function that fetches from your desired secret location, you could save them as env vars on the runtime machine and load them inside the flowNorman Blakely
02/08/2024, 8:09 PMNate
02/08/2024, 8:10 PM