ToReplicaSpec
No overview available.
def ToReplicaSpec(
ctx: context.Context,
taskCtx: pluginsCore.TaskExecutionContext,
primaryContainerName: string
) - > *kubeflowv1.ReplicaSpec, error
Builds a Kubeflow ReplicaSpec from the provided task context and primary container name. This function is used to configure the replica's pod template, including metadata, pod specifications, and restart policy, for execution within a Kubernetes environment.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| taskCtx | pluginsCore.TaskExecutionContext | The task execution context providing metadata and configuration for the task. |
| primaryContainerName | string | The name to assign to the primary container within the pod spec. |
Returns
| Type | Description |
|---|---|
*kubeflowv1.ReplicaSpec, error | A pointer to a kubeflowv1.ReplicaSpec object configured for the task, or an error if the pod spec cannot be created. |