Julien Cabillot 88fca8dbbd .
2022-04-18 11:33:25 -04:00

73 lines
2.7 KiB
YAML

{{- include "common.values.setup" . }}
---
apiVersion: "batch/v1"
kind: "CronJob"
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.controller.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.controller.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
schedule: {{ .Values.cronjob.schedule }}
concurrencyPolicy: {{ .Values.cronjob.concurrencyPolicy }}
successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }}
failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }}
jobTemplate:
spec:
backoffLimit: 0
template:
spec:
containers:
- name: {{ include "common.names.fullname" . }}
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
# {{- with .Values.env }}
# env:
# {{- range $k, $v := . }}
# {{- $name := $k }}
# {{- $value := $v }}
# {{- if kindIs "int" $name }}
# {{- $name = required "environment variables as a list of maps require a name field" $value.name }}
# {{- end }}
# - name: {{ quote $name }}
# {{- if kindIs "map" $value -}}
# {{- if hasKey $value "value" }}
# {{- $value = $value.value -}}
# {{- else if hasKey $value "valueFrom" }}
# {{- toYaml $value | nindent 6 }}
# {{- else }}
# {{- dict "valueFrom" $value | toYaml | nindent 6 }}
# {{- end }}
# {{- end }}
# {{- if not (kindIs "map" $value) }}
# {{- if kindIs "string" $value }}
# {{- $value = tpl $value $ }}
# {{- end }}
# value: {{ quote $value }}
# {{- end }}
# {{- end }}
# {{- end }}
# envFrom:
# {{- with .Values.envFrom }}
# {{- toYaml . | nindent 4 }}
# {{- end }}
# {{- if .Values.secret }}
# - secretRef:
# name: {{ include "common.names.fullname" . }}
# {{- end }}
# {{- end }}
# {{- with (include "common.controller.volumeMounts" . | trim) }}
# volumeMounts:
# {{- nindent 4 . }}
# {{- end }}
# {{- with (include "common.controller.volumes" . | trim) }}
# volumes:
# {{- nindent 2 . }}
# {{- end }}