Ryan Sattler
09/28/2021, 5:05 AMlatest
)Chris L.
09/28/2021, 5:18 AMjob_template.yaml
file. You specify the path to this file in the job_template_path
arg in KubernetesRun
. This path can point to an S3 object using the s3:
prefix or to a path inside the KubernetesAgent
using agent:
prefix.
2. The custom job_template.yaml
file is copied into the Kubernetes Agent's image. I took the Kubernetes Agent K8 config files from prefect/server
Helm chart, then changed the image in the agent's deployment.yaml
to point to this custom Prefect agent image.
a. Don't forget to set up image_pull_secrets
on your agent if you are pulling from a private registry!
3. Package all your custom Python code and non-python files using setuptools
4. In job_template.yaml
specify an "entrypoint" or ARG in K8 speak that pip installs your git package using pip install git+https
EDIT: see end of thread for a simpler solution....Ryan Sattler
09/28/2021, 5:31 AMChris L.
09/28/2021, 5:31 AMGITHUB_ACCESS_TOKEN
environment variable in the Prefect job in order to pip install a package from a private repo.Chris L.
09/28/2021, 5:31 AMChris L.
09/28/2021, 5:32 AMRyan Sattler
09/28/2021, 5:32 AMChris L.
09/28/2021, 5:41 AMjob_template.yaml
which points to their OWN image, then specify the path to that file upon each flow runChris L.
09/28/2021, 5:42 AMSam Werbalowsky
10/05/2021, 7:48 PMChris L.
10/06/2021, 12:34 AMChris L.
10/06/2021, 12:38 AMSam Werbalowsky
10/06/2021, 3:33 PM