Skip to content

Commit 6253cae

Browse files
committed
Merge remote-tracking branch 'origin/candidate-9.6.x' into candidate-9.6.10
Signed-off-by: Jake Smith <[email protected]> # Conflicts: # helm/hpcc/Chart.yaml # helm/hpcc/templates/_helpers.tpl # helm/hpcc/templates/dafilesrv.yaml # helm/hpcc/templates/dali.yaml # helm/hpcc/templates/dfuserver.yaml # helm/hpcc/templates/eclagent.yaml # helm/hpcc/templates/eclccserver.yaml # helm/hpcc/templates/eclscheduler.yaml # helm/hpcc/templates/esp.yaml # helm/hpcc/templates/localroxie.yaml # helm/hpcc/templates/roxie.yaml # helm/hpcc/templates/sasha.yaml # helm/hpcc/templates/thor.yaml # version.cmake
2 parents 3f146f2 + a42ebb4 commit 6253cae

18 files changed

+962
-114
lines changed

common/thorhelper/hpccconfig.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ MODULE_INIT(INIT_PRIORITY_STANDARD)
109109
{
110110
Owned<IPropertyTreeIterator> iter = config->getElements("allowedPipePrograms");
111111
ForEach(*iter)
112-
configuredList.appendUniq(iter->query().queryProp(nullptr));
112+
{
113+
const char *prog = iter->query().queryProp(nullptr);
114+
if (!isEmptyString(prog))
115+
configuredList.appendUniq(prog);
116+
}
113117
}
114118
else
115119
configuredList.appendListUniq(config->queryProp("@allowedPipePrograms"), ",");

dali/ft/filecopy.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,13 @@ void FileSprayer::beforeTransfer()
10151015
if (headerSize)
10161016
io->write(0, headerSize, getHeaderText(tgtFormat.type));
10171017

1018-
if ((lastOutputOffset != 0)&&!compressOutput)
1018+
if (remote.queryFileSystemProperties().preExtendOutput)
10191019
{
1020-
char null = 0;
1021-
io->write(lastOutputOffset-sizeof(null), sizeof(null), &null);
1020+
if ((lastOutputOffset != 0)&&!compressOutput)
1021+
{
1022+
char null = 0;
1023+
io->write(lastOutputOffset-sizeof(null), sizeof(null), &null);
1024+
}
10221025
}
10231026
}
10241027
}

dockerfiles/startall.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dependency_update () {
7575
}
7676

7777
CMD="install"
78-
DEVELOPER_OPTIONS="--set global.privileged=true"
78+
DEVELOPER_OPTIONS="--set global.privileged=true --set global.omitResources=true"
7979
while [ "$#" -gt 0 ]; do
8080
arg=$1
8181
if [[ ${arg:0:1} == '-' ]]; then

helm/hpcc/templates/_helpers.tpl

+35-23
Original file line numberDiff line numberDiff line change
@@ -1316,18 +1316,38 @@ Pass in a dictionary with me defined
13161316
*/}}
13171317
{{- define "hpcc.addResources" }}
13181318
{{- $resources := .me | default .defaults }}
1319-
{{- if $resources }}
1320-
{{- $limits := omit $resources "cpu" }}
1321-
{{- $requests := pick $resources "cpu" }}
1319+
{{- $omitResources := .root.Values.global.omitResources | default false }}
1320+
{{- $resourceCpusWithLimits := hasKey .root.Values.global "resourceCpusWithLimits" | ternary .root.Values.global.resourceCpusWithLimits false -}}
1321+
{{- $resourceWholeCpusWithLimits := hasKey .root.Values.global "resourceWholeCpusWithLimits" | ternary .root.Values.global.resourceWholeCpusWithLimits false -}}
1322+
{{- if not $omitResources }}
1323+
{{- if $resources }}
1324+
{{- $limits := omit $resources "cpu" }}
1325+
{{- $requests := dict }}
1326+
{{- if hasKey $resources "cpu" -}}
1327+
{{- $cpu := $resources.cpu }}
1328+
{{- if $resourceCpusWithLimits -}}
1329+
{{- $_ := set $limits "cpu" $cpu -}}
1330+
{{- else if $resourceWholeCpusWithLimits -}}
1331+
{{- $milliCPUs := int (include "hpcc.k8sCPUStringToMilliCPU" $cpu) }}
1332+
{{- if eq (mod $milliCPUs 1000) 0 -}}
1333+
{{- $_ := set $limits "cpu" $cpu -}}
1334+
{{- else -}}
1335+
{{- $_ := set $requests "cpu" $cpu -}}
1336+
{{- end -}}
1337+
{{- else -}}
1338+
{{- $_ := set $requests "cpu" $cpu -}}
1339+
{{- end -}}
1340+
{{- end }}
13221341
resources:
1323-
{{- if $limits }}
1342+
{{- if $limits }}
13241343
limits:
1325-
{{- toYaml $limits | nindent 4 }}
1326-
{{- end -}}
1327-
{{- if $requests }}
1344+
{{- toYaml $limits | nindent 4 }}
1345+
{{- end -}}
1346+
{{- if $requests }}
13281347
requests:
1329-
{{- toYaml $requests | nindent 4 -}}
1330-
{{- end -}}
1348+
{{- toYaml $requests | nindent 4 -}}
1349+
{{- end -}}
1350+
{{- end -}}
13311351
{{- end -}}
13321352
{{- end -}}
13331353

@@ -1336,16 +1356,11 @@ Add resources object for stub pods
13361356
Pass in dict with root, me and instances defined
13371357
*/}}
13381358
{{- define "hpcc.addStubResources" -}}
1339-
{{- $stubInstanceResources := .stubResources | default .root.Values.global.stubInstanceResources | default dict }}
1340-
{{- $milliCPUText := $stubInstanceResources.cpu | default "200m" }}
1341-
{{- $milliCPUs := int (include "hpcc.k8sCPUStringToMilliCPU" $milliCPUText) }}
1342-
{{- $memoryText := $stubInstanceResources.memory | default "400Mi" }}
1343-
{{- $memory := int64 (include "hpcc.k8sMemoryStringToBytes" $memoryText) }}
1344-
resources:
1345-
limits:
1346-
memory: {{ include "hpcc.bytesToK8sMemoryString" $memory | quote }}
1347-
requests:
1348-
cpu: {{ printf "%dm" $milliCPUs | quote }}
1359+
{{- $stubInstanceResources := .me | default .root.Values.global.stubInstanceResources | default dict }}
1360+
{{- $cpuResource := $stubInstanceResources.cpu | default "200m" }}
1361+
{{- $memoryResource := $stubInstanceResources.memory | default "400Mi" }}
1362+
{{- $resources := dict "memory" $memoryResource "cpu" $cpuResource -}}
1363+
{{- include "hpcc.addResources" (dict "me" $resources "root" .root) }}
13491364
{{- end -}}
13501365

13511366
{{/*
@@ -1408,10 +1423,7 @@ Pass in dict with root, me and dali if container in dali pod
14081423
"--service={{ .me.name }}",
14091424
{{ include "hpcc.daliArg" (dict "root" .root "component" "Sasha" "optional" false "overrideDaliHost" $overrideDaliHost "overrideDaliPort" $overrideDaliPort) | indent 10 }}
14101425
]
1411-
{{- $omitResources := hasKey .root.Values.global "omitResources" | ternary .root.Values.global.omitResources .root.Values.global.privileged }}
1412-
{{- if not $omitResources }}
1413-
{{- include "hpcc.addResources" (dict "me" .me.resources) | indent 2 }}
1414-
{{- end }}
1426+
{{- include "hpcc.addResources" (dict "me" .me.resources "root" .root) | indent 2 }}
14151427
{{- include "hpcc.addSecurityContext" . | indent 2 }}
14161428
env:
14171429
{{ include "hpcc.mergeEnvironments" $env | indent 2 -}}

helm/hpcc/templates/_warnings.tpl

+7-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ Pass in dict with root and warnings
117117
{{- $_ := set $ctx "missingResourcesForCosts" list -}}
118118
{{- $_ := set $ctx "defaultCpuRateComponents" list -}}
119119
{{- $_ := set $ctx "components" (pick .root.Values "dafilesrv" "dali" "sasha" "dfuserver" "eclagent" "eclccserver" "esp" "roxie" "thor" "eclscheduler") -}}
120-
{{- if (.root.Values.sasha.disabled|default false) -}}
120+
{{- $sasha := .root.Values.sasha | dict -}}
121+
{{- if ($sasha.disabled|default false) -}}
121122
{{- $_ := set $ctx "components" (omit $ctx.components "sasha") -}}
122123
{{- end -}}
123124
{{- range $cname, $ctypes := $ctx.components -}}
@@ -209,4 +210,9 @@ Pass in dict with root and warnings
209210
{{- $_ := set $warning "msg" "egress is not restricted to minimum required" -}}
210211
{{- $_ := set $ctx "warnings" (append $ctx.warnings $warning) -}}
211212
{{- end -}}
213+
{{- if .root.Values.global.privileged -}}
214+
{{- $warning := dict "source" "helm" "severity" "warning" -}}
215+
{{- $_ := set $warning "msg" "privileged access should only be enabled for development systems" -}}
216+
{{- $_ := set $ctx "warnings" (append $ctx.warnings $warning) -}}
217+
{{- end -}}
212218
{{- end -}}

helm/hpcc/templates/dafilesrv.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ spec:
7474
value: "/tmp/{{ .name }}.sentinel"
7575
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
7676
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
77-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
78-
{{- if not $omitResources }}
79-
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
80-
{{- end }}
77+
{{- include "hpcc.addResources" (dict "me" .resources "root" $) | indent 8 }}
8178
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
8279
volumeMounts:
8380
{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}

helm/hpcc/templates/dali.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ spec:
116116
value: "/tmp/{{ $dali.name }}.sentinel"
117117
{{ include "hpcc.addSentinelProbes" $dali | indent 8 }}
118118
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
119-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
120-
{{- if not $omitResources }}
121-
{{- include "hpcc.addResources" (dict "me" $dali.resources) | indent 8 }}
122-
{{- end }}
119+
{{- include "hpcc.addResources" (dict "me" $dali.resources "root" $) | indent 8 }}
123120
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
124121
volumeMounts:
125122
{{ include "hpcc.addConfigMapVolumeMount" $dali | indent 8 }}

helm/hpcc/templates/dfuserver.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ spec:
8484
value: "/tmp/{{ .name }}.sentinel"
8585
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
8686
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
87-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
88-
{{- if not $omitResources }}
89-
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
90-
{{- end }}
87+
{{- include "hpcc.addResources" (dict "me" .resources "root" $) | indent 8 }}
9188
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
9289
volumeMounts:
9390
{{- include "hpcc.addVolumeMounts" $commonCtx | indent 8 }}

helm/hpcc/templates/eclagent.yaml

+5-11
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ data:
8282
- name: {{ $appJobName }}
8383
{{- include "hpcc.addSecurityContext" . | indent 12 }}
8484
{{ include "hpcc.addImageAttrs" . | indent 12 }}
85-
{{- $omitResources := hasKey .root.Values.global "omitResources" | ternary .root.Values.global.omitResources .root.Values.global.privileged }}
86-
{{- if not $omitResources }}
87-
{{- include "hpcc.addResources" (dict "me" .me.resources) | indent 12 }}
88-
{{- end }}
85+
{{- include "hpcc.addResources" (dict "me" .me.resources "root" .root) | indent 12 }}
8986
{{- $appCmd := printf "%s %s %s _HPCC_ARGS_" $apptype (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "ECL Agent" "optional" false )) }}
9087
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $appCmd)) | indent 12 }}
9188
env:
@@ -167,13 +164,10 @@ spec:
167164
value: "/tmp/{{ .name }}.sentinel"
168165
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
169166
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
170-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
171-
{{- if not $omitResources }}
172-
{{- if .useChildProcesses }}
173-
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
174-
{{- else }}
175-
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "stubResources" .stubResources)) | indent 8 }}
176-
{{- end }}
167+
{{- if .useChildProcesses }}
168+
{{- include "hpcc.addResources" (dict "me" .resources "root" $) | indent 8 }}
169+
{{- else }}
170+
{{- include "hpcc.addStubResources" (dict "me" .stubResources "root" $) | indent 8 }}
177171
{{- end }}
178172
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
179173
volumeMounts:

helm/hpcc/templates/eclccserver.yaml

+6-12
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ data:
8181
{{- end }}
8282
- name: {{ $compileJobName }}
8383
{{- include "hpcc.addSecurityContext" . | indent 12 }}
84-
{{- $omitResources := hasKey .root.Values.global "omitResources" | ternary .root.Values.global.omitResources .root.Values.global.privileged }}
85-
{{- if not $omitResources }}
86-
{{- include "hpcc.addResources" (dict "me" .me.resources) | indent 12 }}
87-
{{- end }}
84+
{{- include "hpcc.addResources" (dict "me" .me.resources "root" .root) | indent 12 }}
8885
{{ include "hpcc.addImageAttrs" . | indent 12 }}
8986
{{- $misc := .root.Values.global.misc | default dict -}}
9087
{{- $postJobCommand := $misc.postJobCommand | default "" }}
@@ -179,14 +176,11 @@ spec:
179176
value: "/tmp/{{ .name }}.sentinel"
180177
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
181178
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
182-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
183-
{{- if not $omitResources }}
184-
{{- if .useChildProcesses }}
185-
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
186-
{{- else }}
187-
{{- $defaultResources := dict "cpu" "1" "memory" "1Gi" }}
188-
{{- include "hpcc.addResources" (dict "me" .timedChildResources "defaults" $defaultResources) | indent 8 }}
189-
{{- end }}
179+
{{- if .useChildProcesses }}
180+
{{- include "hpcc.addResources" (dict "me" .resources "root" $) | indent 8 }}
181+
{{- else }}
182+
{{- $defaultResources := dict "cpu" "1" "memory" "1Gi" }}
183+
{{- include "hpcc.addResources" (dict "me" .timedChildResources "defaults" $defaultResources "root" $) | indent 8 }}
190184
{{- end }}
191185
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
192186
volumeMounts:

helm/hpcc/templates/eclscheduler.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,8 @@ spec:
9393
value: "/tmp/{{ .name }}.sentinel"
9494
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
9595
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
96-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
97-
{{- if not $omitResources }}
9896
{{- $defaultResources := dict "cpu" "500m" "memory" "200Mi" }}
99-
{{- include "hpcc.addResources" (dict "me" .resources "defaults" $defaultResources) | indent 8 }}
100-
{{- end }}
97+
{{- include "hpcc.addResources" (dict "me" .resources "defaults" $defaultResources "root" $) | indent 8 }}
10198
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
10299
volumeMounts:
103100
{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}

helm/hpcc/templates/esp.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ spec:
158158
value: "/tmp/{{ .name }}.sentinel"
159159
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
160160
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
161-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
162-
{{- if not $omitResources }}
163-
{{- include "hpcc.addResources" (dict "me" .resources) | indent 8 }}
164-
{{- end }}
161+
{{- include "hpcc.addResources" (dict "me" .resources "root" $) | indent 8 }}
165162
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
166163
volumeMounts:
167164
{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}

helm/hpcc/templates/localroxie.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,7 @@ spec:
114114
{{- end }}
115115
{{- end }}
116116
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
117-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
118-
{{- if not $omitResources }}
119-
{{- include "hpcc.addResources" (dict "me" $roxie.resources) | indent 8 }}
120-
{{- end }}
117+
{{- include "hpcc.addResources" (dict "me" $roxie.resources "root" $) | indent 8 }}
121118
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
122119
volumeMounts:
123120
{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}

helm/hpcc/templates/roxie.yaml

+3-12
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,8 @@ spec:
146146
- name: {{ $commonCtx.toponame | quote }}
147147
{{ include "hpcc.addSentinelProbes" $toposerver | indent 8 }}
148148
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
149-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
150-
{{- if not $omitResources }}
151149
{{- $defaultResources := dict "cpu" "500m" "memory" "200Mi" }}
152-
{{- include "hpcc.addResources" (dict "me" .topoResources "defaults" $defaultResources) | indent 8 }}
153-
{{- end }}
150+
{{- include "hpcc.addResources" (dict "me" .topoResources "defaults" $defaultResources "root" $) | indent 8 }}
154151
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
155152
workingDir: /var/lib/HPCCSystems
156153
command: [ {{ include "hpcc.componentCommand" (dict "me" $toposerver "root" $ "process" "toposerver") }} ]
@@ -300,10 +297,7 @@ spec:
300297
command: ["testsocket", ".", "control:closedown"]
301298
{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }}
302299
{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }}
303-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
304-
{{- if not $omitResources }}
305-
{{- include "hpcc.addResources" (dict "me" ($roxie.serverResources | default $roxie.resources)) | indent 8 }}
306-
{{- end }}
300+
{{- include "hpcc.addResources" (dict "me" ($roxie.serverResources | default $roxie.resources) "root" $) | indent 8 }}
307301
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
308302
volumeMounts:
309303
{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }}
@@ -411,10 +405,7 @@ spec:
411405
{{ include "hpcc.addSentinelProbes" ( $roxie | merge (dict "readyProbeName" ".ready" )) | indent 8 }}
412406
{{- end }}
413407
{{ include "hpcc.addSecurityContext" (dict "root" $ "me" .) | indent 8 }}
414-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
415-
{{- if not $omitResources }}
416-
{{- include "hpcc.addResources" (dict "me" ($roxie.channelResources | default $roxie.resources)) | indent 8 }}
417-
{{- end }}
408+
{{- include "hpcc.addResources" (dict "me" ($roxie.channelResources | default $roxie.resources) "root" $) | indent 8 }}
418409
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
419410
volumeMounts:
420411
{{ include "hpcc.addConfigMapVolumeMount" $roxie | indent 8 }}

helm/hpcc/templates/thor.yaml

+8-23
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,7 @@ data:
109109
- name: {{ $eclAgentJobName }}
110110
{{- include "hpcc.addSecurityContext" . | indent 12 }}
111111
{{ include "hpcc.addImageAttrs" . | indent 12 }}
112-
{{- $omitResources := hasKey .root.Values.global "omitResources" | ternary .root.Values.global.omitResources .root.Values.global.privileged }}
113-
{{- if not $omitResources }}
114-
{{- include "hpcc.addResources" (dict "me" .eclAgentResources) | indent 12 }}
115-
{{- end }}
112+
{{- include "hpcc.addResources" (dict "me" .eclAgentResources "root" .root) | indent 12 }}
116113
{{- $agentCmd := printf "%s %s %s _HPCC_ARGS_" $eclAgentType (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "Thor" "optional" false)) }}
117114
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $agentCmd)) | indent 12 }}
118115
env:
@@ -179,10 +176,7 @@ data:
179176
- name: {{ $thorManagerJobName }}
180177
{{- include "hpcc.addSecurityContext" . | indent 12 }}
181178
{{ include "hpcc.addImageAttrs" . | indent 12 }}
182-
{{- $omitResources := hasKey .root.Values.global "omitResources" | ternary .root.Values.global.omitResources .root.Values.global.privileged }}
183-
{{- if not $omitResources }}
184-
{{- include "hpcc.addResources" (dict "me" $thorScope.managerResources) | indent 12 }}
185-
{{- end }}
179+
{{- include "hpcc.addResources" (dict "me" $thorScope.managerResources "root" .root) | indent 12 }}
186180
{{- $thorManagerCmd := printf "thormaster_lcr %s %s _HPCC_ARGS_" (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "Thor" "optional" false)) }}
187181
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $thorManagerCmd)) | indent 12 }}
188182
env:
@@ -251,10 +245,7 @@ data:
251245
- name: {{ $thorWorkerJobName }}-{{ $containerNum }}
252246
{{- include "hpcc.addSecurityContext" $configCtx | indent 12 }}
253247
{{ include "hpcc.addImageAttrs" $configCtx | indent 12 }}
254-
{{- $omitResources := hasKey $configCtx.root.Values.global "omitResources" | ternary $configCtx.root.Values.global.omitResources $configCtx.root.Values.global.privileged }}
255-
{{- if not $omitResources }}
256-
{{- include "hpcc.addResources" (dict "me" $thorScope.workerResources) | indent 12 }}
257-
{{- end }}
248+
{{- include "hpcc.addResources" (dict "me" $thorScope.workerResources "root" $configCtx.root) | indent 12 }}
258249
{{- $thorWorkerCmd := printf "thorslave_lcr %s %s _HPCC_ARGS_ --slaveport=%d" (include "hpcc.configArg" $configCtx.me) (include "hpcc.daliArg" (dict "root" $configCtx.root "component" "Thor" "optional" false)) $slavePort }}
259250
{{ include "hpcc.addCommandAndLifecycle" ($configCtx | merge (dict "command" $thorWorkerCmd)) | indent 12 }}
260251
env:
@@ -390,13 +381,10 @@ spec:
390381
- name: "SENTINEL"
391382
value: "/tmp/{{ $commonCtx.eclAgentName }}.sentinel"
392383
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
393-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
394-
{{- if not $omitResources }}
395-
{{- if $commonCtx.eclAgentUseChildProcesses }}
396-
{{- include "hpcc.addResources" (dict "me" .eclAgentResources) | indent 8 }}
397-
{{- else }}
398-
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "stubResources" .stubResources)) | indent 8 }}
399-
{{- end }}
384+
{{- if $commonCtx.eclAgentUseChildProcesses }}
385+
{{- include "hpcc.addResources" (dict "me" .eclAgentResources "root" $) | indent 8 }}
386+
{{- else }}
387+
{{- include "hpcc.addStubResources" (dict "me" .stubResources "root" $) | indent 8 }}
400388
{{- end }}
401389
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
402390
volumeMounts:
@@ -456,10 +444,7 @@ spec:
456444
- name: "SENTINEL"
457445
value: "/tmp/{{ $commonCtx.thorAgentName }}.sentinel"
458446
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
459-
{{- $omitResources := hasKey $.Values.global "omitResources" | ternary $.Values.global.omitResources $.Values.global.privileged }}
460-
{{- if not $omitResources }}
461-
{{- include "hpcc.addStubResources" ($commonCtx | merge (dict "stubResources" .stubResources)) | indent 8 }}
462-
{{- end }}
447+
{{- include "hpcc.addStubResources" (dict "me" .stubResources "root" $ ) | indent 8 }}
463448
{{ include "hpcc.addImageAttrs" $commonCtx | indent 8 }}
464449
volumeMounts:
465450
{{ include "hpcc.addConfigMapVolumeMount" . | indent 8 }}

0 commit comments

Comments
 (0)