MCPcopy Create free account
hub / github.com/cozystack/cozystack / mergeResourceList

Function mergeResourceList

internal/fluxshardoperator/provisioner.go:237–247  ·  view source on GitHub ↗

mergeResourceList overlays the configured quantities onto the cloned ones, keeping cloned entries the overrides do not name.

(dst *corev1.ResourceList, overrides corev1.ResourceList)

Source from the content-addressed store, hash-verified

235// mergeResourceList overlays the configured quantities onto the cloned ones,
236// keeping cloned entries the overrides do not name.
237func mergeResourceList(dst *corev1.ResourceList, overrides corev1.ResourceList) {
238 if len(overrides) == 0 {
239 return
240 }
241 if *dst == nil {
242 *dst = corev1.ResourceList{}
243 }
244 for name, quantity := range overrides {
245 (*dst)[name] = quantity
246 }
247}
248
249// BuildShardDeployment clones the helm-controller container out of the
250// flux-aio Deployment and sanitises it into a standalone single-shard

Callers 1

BuildShardDeploymentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected