Skip to content

Commit

Permalink
HPCC-31566 Stop using stub resources for eclscheduler,toposerver,eclc…
Browse files Browse the repository at this point in the history
…cserver

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Apr 23, 2024
1 parent 9092eb3 commit 9999f44
Show file tree
Hide file tree
Showing 6 changed files with 883 additions and 6 deletions.
7 changes: 4 additions & 3 deletions helm/hpcc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1315,9 +1315,10 @@ Add resource object
Pass in a dictionary with me defined
*/}}
{{- define "hpcc.addResources" }}
{{- if .me }}
{{- $limits := omit .me "cpu" }}
{{- $requests := pick .me "cpu" }}
{{- $resources := .me | default .defaults }}
{{- if $resources }}
{{- $limits := omit $resources "cpu" }}
{{- $requests := pick $resources "cpu" }}
resources:
{{- if $limits }}
limits:
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/eclccserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ spec:
{{- if .useChildProcesses }}
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
{{- else }}
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "instances" .maxActive)) | indent 8 }}
{{- $defaultResources := dict "cpu" "1" "memory" "1Gi" }}
{{- include "hpcc.addResources" (dict "me" .timedChildResources "defaults" $defaultResources) | indent 8 }}
{{- end }}
{{- end }}
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/eclscheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ spec:
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
{{- if not $omitResources }}
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "instances" 1)) | indent 8 }}
{{- $defaultResources := dict "cpu" "500m" "memory" "800Mi" }}
{{- include "hpcc.addResources" (dict "me" .resources "defaults" $defaultResources) | indent 8 }}
{{- end }}
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
volumeMounts:
Expand Down
3 changes: 2 additions & 1 deletion helm/hpcc/templates/roxie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ spec:
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
{{- if not $omitResources }}
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "instances" 1)) | indent 8 }}
{{- $defaultResources := dict "cpu" "500m" "memory" "500Mi" }}
{{- include "hpcc.addResources" (dict "me" .topoResources "defaults" $defaultResources) | indent 8 }}
{{- end }}
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
workingDir: /var/lib/HPCCSystems
Expand Down
6 changes: 6 additions & 0 deletions helm/hpcc/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,9 @@
"resources": {
"$ref": "#/definitions/resources"
},
"timedChildResources": {
"$ref": "#/definitions/resources"
},
"cost": {
"$ref" : "#/definitions/componentCost"
},
Expand Down Expand Up @@ -1724,6 +1727,9 @@
"channelResources": {
"$ref": "#/definitions/resources"
},
"topoResources": {
"$ref": "#/definitions/resources"
},
"annotations": {
"type": "object",
"additionalProperties": { "type": "string" }
Expand Down
Loading

0 comments on commit 9999f44

Please sign in to comment.