瀏覽代碼

HPCC-25590 Use dali image attrs for sasha in same pod

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 4 年之前
父節點
當前提交
c8e01924de
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 4 3
      helm/hpcc/templates/_helpers.tpl
  2. 1 1
      helm/hpcc/templates/dali.yaml

+ 4 - 3
helm/hpcc/templates/_helpers.tpl

@@ -690,6 +690,7 @@ data:
 
 {{/*
 A template to generate Sasha service containers
+Pass in dict with root, me and dali if container in dali pod
 */}}
 {{- define "hpcc.addSashaContainer" }}
 {{- $serviceName := printf "sasha-%s" .me.name }}
@@ -704,11 +705,11 @@ A template to generate Sasha service containers
 {{ include "hpcc.daliArg" .root | indent 10 }}
         ]
 {{- include "hpcc.addResources" (dict "me" .me.resources) | indent 2 }}
-{{- include "hpcc.addSecurityContext" .  | indent 2 }}
+{{- include "hpcc.addSecurityContext" . | indent 2 }}
 {{- with (dict "name" $serviceName) }}
-{{ include "hpcc.addSentinelProbes" .  | indent 2 }}
+{{ include "hpcc.addSentinelProbes" . | indent 2 }}
 {{- end }}
-{{ include "hpcc.addImageAttrs" .  | indent 2 }}
+{{ include "hpcc.addImageAttrs" (dict "root" .root "me" (.dali | default .me)) | indent 2 }}
 {{- end -}}
 
 {{/*

+ 1 - 1
helm/hpcc/templates/dali.yaml

@@ -49,7 +49,7 @@ spec:
 {{- $_ := set $tmpDaliScope "aggregateSashaAccess" ((concat $tmpDaliScope.aggregateSashaAccess $sashaAccess) | uniq) -}}
 {{- $_ := set $tmpDaliScope "aggregateSashaSecretsCategories" ((concat $tmpDaliScope.aggregateSashaSecretsCategories $sashaServiceSecretsCategories) | uniq) -}}
 {{- with ($sasha | merge (dict "access" $sashaAccess)) -}}
-{{ include "hpcc.addSashaContainer" (dict "root" $ "me" .) | indent 6 }}
+{{ include "hpcc.addSashaContainer" (dict "root" $ "me" . "dali" $dali) | indent 6 }}
         volumeMounts:
 {{- include "hpcc.addSashaVolumeMounts" (dict "root" $ "me" .) | indent 8 }}
 {{ include "hpcc.addSecretVolumeMounts" (dict "root" $ "secretsCategories" $sashaServiceSecretsCategories) | indent 8 }}