Skip to content

Commit

Permalink
[cronjobs] fix logic checks (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Rainer 'rei' Schuth <rainer.schuth@digital-results-international.com>
  • Loading branch information
reixd and Rainer 'rei' Schuth authored Apr 5, 2024
1 parent bbbacea commit 054a469
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/cronjobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: cronjobs
description: A generic helm cronjob chart for kubernetes
type: application
version: 1.1.0
version: 1.1.1
appVersion: latest
home: https://github.com/klicktipp/helm-charts
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/cronjobs/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data:
{{- end }}

{{- range $job_name, $job := .Values.jobs }}
{{- if and (hasKey $job "extraFiles") $job.extraFiles }}
{{- if and $job (hasKey $job "extraFiles") $job.extraFiles }}
{{- $checksum := toYaml $job.extraFiles | sha256sum | trunc 20 | quote }}
---
apiVersion: v1
Expand Down
4 changes: 3 additions & 1 deletion charts/cronjobs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- $chart_name := include "cronjobs.fullname" . }}
{{- $service_account_name := include "cronjobs.serviceAccountName" . }}
{{- range $job_name, $job := .Values.jobs }}
{{- if $job }}
{{- $JOB_NAME_SLUG := include "com.klicktipp.slugify-volume-name" $job_name }}
{{- $env := mergeOverwrite dict $.Values.env ($job.env | default dict) }}
---
Expand Down Expand Up @@ -179,4 +180,5 @@ spec:
secret:
secretName: {{ print $chart_name "-" $job_name }}
{{- end }}
{{- end }}
{{- end }} {{/* # end if check $job */}}
{{- end }} {{/* # end range $job */}}
2 changes: 1 addition & 1 deletion charts/cronjobs/templates/volumes.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
{{- range $job_name, $job := .Values.jobs }}
{{- $JOB_NAME_SLUG := include "com.klicktipp.slugify-volume-name" $job_name }}
{{- if and $job.storage (hasKey $job.storage "efs") (hasKey $job.storage.efs "mounts") }}
{{- if and $job (hasKey $job "storage") (hasKey $job.storage "efs") (hasKey $job.storage.efs "mounts") }}
{{- range $efs_mount := $job.storage.efs.mounts }}
{{- range $efs_ap := $efs_mount.access_points }}
{{- $EFS_AP_ID_TRIMMED := trimPrefix "fsap-" $efs_ap.id }}
Expand Down

0 comments on commit 054a469

Please sign in to comment.