diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/config/config.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/config/config.go index 404924ef07..109ef06ba1 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/config/config.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/config/config.go @@ -156,6 +156,9 @@ type K8sPluginConfig struct { // one, and the corresponding task marked as failed ImagePullBackoffGracePeriod config2.Duration `json:"image-pull-backoff-grace-period" pflag:"-,Time to wait for transient ImagePullBackoff errors to be resolved."` + // ImagePullPolicy for the submitted pod. + ImagePullPolicy v1.PullPolicy `json:"image-pull-policy" pflag:"-,Image pull policy for all k8s pods created by FlytePropeller."` + // Time to wait while pod is in pending phase. If the pod is stuck in // pending phase past this timeout, it will be inferred to be a permanent // issue, and the corresponding task marked as failed diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go index 268819473a..d0cbe62b07 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/container_helper.go @@ -226,6 +226,7 @@ func BuildRawContainer(ctx context.Context, tCtx pluginscore.TaskExecutionContex Env: ToK8sEnvVar(taskContainer.GetEnv()), TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError, Resources: *res, + ImagePullPolicy: config.GetK8sPluginConfig().ImagePullPolicy, } return container, nil