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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | pluginsCore.TaskExecutionContext | The task execution context which provides the definition for building the PodSpec and ObjectMeta. |
Returns
| Type | Description |
|---|---|
(*v1.PodSpec, *metav1.ObjectMeta, string, error) | A Kubernetes PodSpec, ObjectMeta, the primary container's name, and an error if the operation fails. |