Skip to content

Commit

Permalink
add plugins support for k8s imagepullpolicy (#5167)
Browse files Browse the repository at this point in the history
Signed-off-by: novahow <[email protected]>
  • Loading branch information
novahow authored Apr 15, 2024
1 parent ed23620 commit 3004af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3004af4

Please sign in to comment.