Skip to content

Commit

Permalink
add plugins support for k8s imagepullpolicy
Browse files Browse the repository at this point in the history
Signed-off-by: novahow <[email protected]>
  • Loading branch information
novahow committed Apr 3, 2024
1 parent 524b473 commit ee3f1c2
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 @@ -203,6 +203,9 @@ type K8sPluginConfig struct {

// SendObjectEvents indicates whether to send k8s object events in TaskExecutionEvent updates (similar to kubectl get events).
SendObjectEvents bool `json:"send-object-events" pflag:",If true, will send k8s object events in TaskExecutionEvent updates."`

// ImagePullPolicy for the submitted pod.
ImagePullPolicy v1.PullPolicy `json:"image-pull-policy" pflag:"-,Image pull policy for all k8s pods created by FlytePropeller."`
}

// FlyteCoPilotConfig specifies configuration for the Flyte CoPilot system. FlyteCoPilot, allows running flytekit-less containers
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 ee3f1c2

Please sign in to comment.