Skip to content

Commit e5f7c3d

Browse files
author
Jonathan S. Katz
committed
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.
1 parent c9759b8 commit e5f7c3d

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed
Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
"resources": {
2-
"requests": {
3-
"memory": "{{.RequestsMemory}}",
4-
"cpu": "{{.RequestsCPU}}"
5-
},
6-
"limits": {
7-
"memory": "{{.LimitsMemory}}",
8-
"cpu": "{{.LimitsCPU}}"
9-
}
10-
},
1+
"resources": {
2+
{{ if or .RequestsMemory .RequestsCPU }}
3+
"requests": {
4+
{{ if .RequestsCPU }}
5+
"cpu": "{{.RequestsCPU}}"{{ if .RequestsMemory }},{{ end }}
6+
{{ end }}
7+
{{ if .RequestsMemory }}
8+
"memory": "{{.RequestsMemory}}"
9+
{{ end }}
10+
}{{ if or .LimitsCPU .LimitsMemory }},{{ end }}
11+
{{ end }}
12+
{{ if or .LimitsCPU .LimitsMemory }}
13+
"limits": {
14+
{{ if .LimitsCPU }}
15+
"cpu": "{{.LimitsCPU}}"{{ if .LimitsMemory }},{{ end }}
16+
{{ end }}
17+
{{ if .LimitsMemory }}
18+
"memory": "{{.LimitsMemory}}"
19+
{{ end }}
20+
}
21+
{{ end }}
22+
},

0 commit comments

Comments
 (0)