Carsten Klaus08/02/2023, 2:38 PM
for task pods? I have a question regarding task pods. We recently encountered the problem that a certain package was not installed in our custom task image, however we could clearly see that the package has been installed. We did a little research and recognized that the task pod has
. So our Kubernetes cluster took the image from the internal cache and thus took the "old" one. We need to overcome this problem. We installed flyte via
with a custom
. Can we set the task imagePullPolicy somewhere to Always? Is there any other way to enforce a fresh image pull each time?
Carsten Klaus08/03/2023, 2:08 PM
David Espejo (he/him)08/04/2023, 12:34 PM
is not configurable from the Helm chart. Nevertheless, Flyte provides a native mechanism to modify this type of Pod-level parameters: PodTemplate You can either define a global PodTemplate or even declare one inline per-task: https://docs.flyte.org/en/latest/deployment/configuration/general.html#using-k8s-podtemplates Please let us know if it answers your question
Pryce08/14/2023, 4:54 PM
from flytekit.core.pod_template import PodTemplate from kubernetes.client.models import V1PodSpec, V1Volume, V1Container, V1VolumeMount, V1EnvVar, V1PersistentVolumeClaimVolumeSource ps = V1PodSpec( containers=[ V1Container( name='primary', image='<http://docker.io/rwgrim/docker-noop|docker.io/rwgrim/docker-noop>', image_pull_policy='Always', ) ] ) ] )
@task(task_config=Pod(pod_spec=ps)) def always_pull_task(): ...