Ensure container resources file is synced across installers
...with a personal hope that having the new installer container will
limit the need for these kinds of commits.
"resources": {
+ {{ if or .RequestsMemory .RequestsCPU }}
"requests": {
- "memory": "{{.RequestsMemory}}",
- "cpu": "{{.RequestsCPU}}"
- },
+ {{ if .RequestsCPU }}
+ "cpu": "{{.RequestsCPU}}"{{ if .RequestsMemory }},{{ end }}
+ {{ end }}
+ {{ if .RequestsMemory }}
+ "memory": "{{.RequestsMemory}}"
+ {{ end }}
+ }{{ if or .LimitsCPU .LimitsMemory }},{{ end }}
+ {{ end }}
+ {{ if or .LimitsCPU .LimitsMemory }}
"limits": {
- "memory": "{{.LimitsMemory}}",
- "cpu": "{{.LimitsCPU}}"
+ {{ if .LimitsCPU }}
+ "cpu": "{{.LimitsCPU}}"{{ if .LimitsMemory }},{{ end }}
+ {{ end }}
+ {{ if .LimitsMemory }}
+ "memory": "{{.LimitsMemory}}"
+ {{ end }}
}
+ {{ end }}
},
