diff --git a/vars/buildContainerImage2.groovy b/vars/buildContainerImage2.groovy index 71c8a03..d7d5e3b 100644 --- a/vars/buildContainerImage2.groovy +++ b/vars/buildContainerImage2.groovy @@ -117,7 +117,9 @@ def runInPod(args, block) { if (resources) { def tmpl = readYaml(text: podTemplateYaml) tmpl.spec.containers.each { c -> - c.resources = c.resources ?: [requests: [:], limits: [:]] + c.resources = c.resources ?: [:] + c.resources.requests = c.resources.requests ?: [:] + c.resources.limits = c.resources.limits ?: [:] c.resources.requests += resources c.resources.limits += resources }