Skip to main content

MergeOverlayPodSpecOntoBase

Merges a customized pod spec onto a base pod spec. At a container level it will merge containers that have matching names.

def MergeOverlayPodSpecOntoBase(
basePodSpec: *v1.PodSpec,
overlayPodSpec: *v1.PodSpec
) - > *v1.PodSpec, error

Merges a customized pod specification onto a base pod specification. This function merges containers with matching names at the container level.

Parameters

NameTypeDescription
basePodSpec*v1.PodSpecThe base PodSpec to which the overlay will be applied. This specification serves as the foundation for the merged result.
overlayPodSpec*v1.PodSpecThe overlay PodSpec containing customizations to be merged into the basePodSpec. Its values will override corresponding values in the basePodSpec.

Returns

TypeDescription
*v1.PodSpec, errorThe merged PodSpec, or an error if either input PodSpec is nil or if merging fails.