Hello! I'm trying to deploy multiple deployments u...
# best-practices
a
Hello! I'm trying to deploy multiple deployments using
prefect.yaml
(using a Kubernetes Work Pool) with a custom
{{ image }}
, but I just discovered that I can't use the
prefect deploy --all
command with a
--variable image="${MY_IMAGE_NAME_THAT_HAS_BEEN_BUILD_ELSEWHERE}"
and... Well I'm kind of stuck. What is the best way to do such a thing? All my deployments share the same Docker image (everything is embed in it)
n
hi @Adrien Besnard - you can have a yaml def for the work pool like this and then put that on each deployment that needs the image overridden for its work pool - does that make sense?
where in my example, im using the image from my build step, but you could hardcode your image, or template it in from an env var / variable / secret value
a
Yes, totally, thanks a lot! The missing piece was the environment variable for my case. I didn't realize I can use
{{ $IMAGE }}
to retrieve a value from an env var.
Thanks again @Nate
n
🦜