0e0f29ee43
* allow file configmap on cron-job chart * Allow disabling the command override in cronjob container * Use name of volume instead of fileName for configmap naming * Add YAML separator to configmaps to allow multiple configmap volumes - before this change if you tried to use e.g. multiple file configmaps they would all be appended in one YAML file due to no usage of separators, which would lead to only one of the file confimaps actually be created. * Fix broken test due to file configmap naming change
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "helm-chart.labels" . | nindent 4 }}
|
|
spec:
|
|
schedule: {{ .Values.schedule | quote }}
|
|
{{- with .Values.constraints }}
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: {{ .Release.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
{{- if .Values.vars }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- end }}
|
|
{{- if .Values.overrideCommand }}
|
|
command:
|
|
- {{ .Values.shell }}
|
|
- -c
|
|
- {{ .Values.command | quote }}
|
|
{{- end }}
|
|
{{- include "common.envFromRef.tpl" . | nindent 14 }}
|
|
{{- include "common.volumeMountsRef.tpl" . | nindent 14 }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 16 }}
|
|
{{- include "common.volumesRef.tpl" . | nindent 10 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|