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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | pluginsCore.TaskExecutionContext | The task execution context, providing access to task details, inputs, outputs, and metadata. |
| podSpec | *v1.PodSpec | The Kubernetes PodSpec to be updated with Flyte-specific configurations. |
| objectMeta | *metav1.ObjectMeta | The Kubernetes ObjectMeta to be updated with Flyte-specific labels or annotations. |
| primaryContainerName | string | The name of the primary container within the PodSpec, which receives special configuration. |
Returns
| Type | Description |
|---|---|
(*v1.PodSpec, *metav1.ObjectMeta, error) | The updated PodSpec and ObjectMeta, or an error if the configuration fails. |