helm-toolkit: include mounts in the bootstrap job

Respect the mounts defined by each service and mount them into the
bootstrap job.

Change-Id: Ic169e00208b7ca22a998ad8e2659cd42c49b5339
This commit is contained in:
Doug Goldstein 2025-04-08 08:27:40 -05:00
parent f37dd907f9
commit 06d7634320
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View File

@ -20,12 +20,13 @@ limitations under the License.
{{- define "helm-toolkit.manifests.job_bootstrap" -}}
{{- $envAll := index . "envAll" -}}
{{- $serviceName := index . "serviceName" -}}
{{- $jobNameRef := printf "%s_%s" $serviceName "bootstrap" -}}
{{- $jobAnnotations := index . "jobAnnotations" -}}
{{- $jobLabels := index . "jobLabels" -}}
{{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}}
{{- $tolerationsEnabled := index . "tolerationsEnabled" | default false -}}
{{- $podVolMounts := index . "podVolMounts" | default false -}}
{{- $podVols := index . "podVols" | default false -}}
{{- $podVolMounts := index . "podVolMounts" | default (dig $jobNameRef $jobNameRef "volumeMounts" false $envAll.Values.pod.mounts) -}}
{{- $podVols := index . "podVols" | default (dig $jobNameRef $jobNameRef "volumes" false $envAll.Values.pod.mounts) -}}
{{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}}
{{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}}
{{- $configFile := index . "configFile" | default (printf "/etc/%s/%s.conf" $serviceName $serviceName ) -}}

View File

@ -0,0 +1,5 @@
---
helm-toolkit:
- |
Mount volumes requested into the job's pod.
...