Skip to main content

ApplyFlytePodConfiguration

ApplyFlytePodConfiguration updates the PodSpec and ObjectMeta with various Flyte configuration. This includes applying default k8s configuration, applying overrides (resources etc.), injecting copilot containers, and merging with the configuration PodTemplate (if exists).

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

Updates the PodSpec and ObjectMeta with various Flyte configuration. This includes applying default k8s configuration, applying overrides (resources etc.), injecting copilot containers, and merging with the configuration PodTemplate (if exists).

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxpluginsCore.TaskExecutionContextThe task execution context, providing access to task details, inputs, outputs, and metadata.
podSpec*v1.PodSpecThe Kubernetes PodSpec to be updated with Flyte-specific configurations.
objectMeta*metav1.ObjectMetaThe Kubernetes ObjectMeta to be updated with Flyte-specific labels and annotations.
primaryContainerNamestringThe name of the primary container within the PodSpec to which specific configurations like copilot and resource overrides will be applied.

Returns

TypeDescription
(*v1.PodSpec, *metav1.ObjectMeta, error)The updated PodSpec and ObjectMeta, or an error if the configuration fails.