Skip to content

Commit

Permalink
chore: add support for extraVolumeMounts in Krawler cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Nov 20, 2024
1 parent b9edb03 commit a44de5a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions charts/kargo/templates/_krawler-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,27 @@ spec:
- name: MESSAGE_TEMPLATE
value: "*<%= SUBDOMAIN %>*\nKrawler job *<%= jobId %>*: <%= error.message %>"
{{- include "kargo.environment.render" (dict "env" .Values.env "rawEnv" .Values.rawEnv "context" $) | indent 16 }}
{{- if .Values.dataVolume }}
volumeMounts:
{{- if .Values.dataVolume }}
- mountPath: {{ .Values.dataMountPath | default "/data" }}
name: job-data
{{- if .Values.dataSubPath }}
subPath: {{ include "kargo.tplvalues.render" ( dict "value" .Values.dataSubPath "context" $) }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 16 }}
# It won't restart on failure, next chance will be on next CRON
restartPolicy: Never
{{- if .Values.dataVolume }}
volumes:
{{- if .Values.dataVolume }}
- name: job-data
{{- include "kargo.tplvalues.render" ( dict "value" .Values.dataVolume "context" $ ) | nindent 14 }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
{{- end -}}

0 comments on commit a44de5a

Please sign in to comment.