Skip to main content

MergeWithBasePodTemplate

MergeWithBasePodTemplate attempts to merge the provided PodSpec and ObjectMeta with the configuration PodTemplate for this task.

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

MergeWithBasePodTemplate attempts to merge the provided PodSpec and ObjectMeta with the configuration PodTemplate for this task.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
tCtxpluginsCore.TaskExecutionContextThe task execution context, providing access to task-specific information and utilities.
podSpec*v1.PodSpecThe PodSpec to be merged with the base PodTemplate.
objectMeta*metav1.ObjectMetaThe ObjectMeta to be merged with the base PodTemplate's ObjectMeta.
primaryContainerNamestringThe name of the primary container within the PodSpec.
primaryInitContainerNamestringThe name of the primary init container within the PodSpec.

Returns

TypeDescription
(*v1.PodSpec, *metav1.ObjectMeta, error)The merged PodSpec, merged ObjectMeta, and an error if the merge fails.