Rajip Upreti
10/09/2024, 5:51 AMMarvin
10/09/2024, 5:51 AMprefect.yaml
file to always pull an image, you need to define the image_pull_policy
in your job variables. This applies to both Prefect 2.x and 3.x.
1. Define job variables: The job_variables
section in prefect.yaml
allows you to fine-tune infrastructure settings for a specific deployment. This includes settings like image_pull_policy
which determines how images are fetched (e.g., always pull from a remote registry).
2. Set image_pull_policy
: For instance, if you want the image to always be pulled, set image_pull_policy
to Always
.
Here's a simplified outline on how you might configure it in a `prefect.yaml`:
yaml
job_variables:
image_pull_policy: Always
3. Initialize and configure: Use the CLI to initialize your deployment configuration which creates the prefect.yaml
file if needed. In Prefect, run the command prefect init
within your project directory.
For more details, you can refer to the Prefect documentation - Prefect 2.x Guide and Prefect 3.x Guide.
These resources provide comprehensive guidance on deployment configurations, including managing job variables in your prefect.yaml
file.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by