add autovault helm chart
This commit is contained in:
54
autovault/templates/cronjob.yaml
Normal file
54
autovault/templates/cronjob.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
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 }}
|
Reference in New Issue
Block a user