Skip to main content

MergeResources

Merges resource requirements from an input v1.ResourceRequirements object into an output v1.ResourceRequirements object. If the output's Limits or Requests are nil, they are set to the input's corresponding values; otherwise, the input's Limits and Requests are merged into the output's existing maps.

def MergeResources(
in: v1.ResourceRequirements,
out: *v1.ResourceRequirements
) - > null

Merges resource requirements from an input object into an output object. This function is used to combine resource specifications, ensuring that if the output object's limits or requests are not set, they inherit from the input, or individual resource keys are updated.

Parameters

NameTypeDescription
inv1.ResourceRequirementsThe source resource requirements object from which limits and requests will be merged.
out*v1.ResourceRequirementsThe destination resource requirements object to which limits and requests will be merged. This object is modified in place.

Returns

TypeDescription
nullThis function does not return any value; it modifies the 'out' parameter in place.