55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ include "autovault.fullname" . }}
|
|
labels:
|
|
{{- include "autovault.labels" . | nindent 4 }}
|
|
spec:
|
|
concurrencyPolicy: Forbid
|
|
schedule: {{ .Values.autovaultSchedule | quote }}
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 1
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 2
|
|
activeDeadlineSeconds: 300
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "autovault.fullname" . }}
|
|
restartPolicy: Never
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: autovault
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
volumeMounts:
|
|
- name: {{ include "autovault.fullname" . }}-data
|
|
mountPath: /vault/data
|
|
- name: {{ include "autovault.fullname" . }}-scripts
|
|
mountPath: /vault/scripts
|
|
command: [ "/bin/bash", "-c", "/vault/scripts/autovault.sh" ]
|
|
volumes:
|
|
- name: {{ include "autovault.fullname" . }}-data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "autovault.fullname" . }}-data
|
|
- name: {{ include "autovault.fullname" . }}-scripts
|
|
configMap:
|
|
name: {{ include "autovault.fullname" . }}-scripts
|
|
defaultMode: 0777
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|