44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
{{ if .Values.fediblockhole.cron.sync.enabled -}}
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ include "fediblockhole.fullname" . }}-sync
|
|
labels:
|
|
{{- include "fediblockhole.labels" . | nindent 4 }}
|
|
spec:
|
|
schedule: {{ .Values.fediblockhole.cron.sync.schedule }}
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
name: {{ include "fediblockhole.fullname" . }}-sync
|
|
{{- with .Values.jobAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: {{ include "fediblockhole.fullname" . }}-sync
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
command:
|
|
- fediblock
|
|
- -c
|
|
- {{ .Values.fediblockhole.conf_file_path }}{{ .Values.fediblockhole.conf_file_filename }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ include "fediblockhole.fullname" . }}-conf-toml
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "{{ .Values.fediblockhole.conf_file_path }}"
|
|
subPath: {{ .Values.fediblockhole.conf_file_filename }}
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "fediblockhole.fullname" . }}-conf-toml
|
|
items:
|
|
- key: "{{ .Values.fediblockhole.conf_file_filename }}"
|
|
path: "{{ .Values.fediblockhole.conf_file_filename }}"
|
|
{{- end }}
|