46 lines
1.5 KiB
YAML
46 lines
1.5 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:
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
backoffLimit: 0
|
|
automountServiceAccountToken: false
|
|
containers:
|
|
- name: "mydl-mongo-dump"
|
|
image: "docker.io/library/mariadb:10.2"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
command : ["/bin/sh", "-c"]
|
|
args: [ "echo toto" ]
|
|
# TODO: volumemount avec le pvc deja cree ?
|
|
# volumeMounts:
|
|
# - mountPath: "/dump"
|
|
# name: "mydl-mongo-dump"
|
|
# TODO: surement des envs ?
|
|
# env:
|
|
# - name: "MONGO_INITDB_ROOT_USERNAME"
|
|
# value: "toto"
|
|
# TODO: volumemount avec le pvc deja cree ?
|
|
# volumes:
|
|
# - name: "mydl-mongo-dump"
|
|
# persistentVolumeClaim:
|
|
# claimName: "mydl-mongo-dump" |