Skip to main content

ToK8sPodSpec

ToK8sPodSpec builds a PodSpec and ObjectMeta based on the definition passed by the TaskExecutionContext. This involves parsing the raw PodSpec definition and applying all Flyte configuration options.

def ToK8sPodSpec(
ctx: context.Context,
tCtx: pluginsCore.TaskExecutionContext
) - > (*v1.PodSpec, *metav1.ObjectMeta, string, error)

Builds a PodSpec and ObjectMeta based on the definition passed by the TaskExecutionContext. This involves parsing the raw PodSpec definition and applying all Flyte configuration options.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxpluginsCore.TaskExecutionContextThe task execution context which provides the definition for building the PodSpec and ObjectMeta.

Returns

TypeDescription
(*v1.PodSpec, *metav1.ObjectMeta, string, error)A Kubernetes PodSpec, ObjectMeta, the primary container's name, and an error if the operation fails.