fediblockhole-misskey/chart/templates/cronjob-fediblock-sync.yaml

46 lines
1.7 KiB
YAML
Raw Normal View History

2023-01-21 23:56:35 +00:00
{{ 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 }}
2023-01-22 00:20:16 +00:00
command:
- fediblock
- -c
2023-01-22 00:44:38 +00:00
- {{ .Values.fediblockhole.conf_file.path }}{{ .Values.fediblockhole.conf_file.filename }}
2023-01-21 23:56:35 +00:00
envFrom:
- configMapRef:
name: {{ include "fediblockhole.fullname" . }}-env
- secretRef:
name: {{ template "fediblockhole.secretName" . }}
2023-01-22 00:28:56 +00:00
volumeMounts:
- name: config
2023-01-22 00:44:38 +00:00
mountPath: "{{ .Values.fediblockhole.conf_file.path }}"
subPath: {{ .Values.fediblockhole.conf_file.filename }}
volumes:
- name: config
configMap:
name: {{ include "fediblockhole.fullname" . }}-env
items:
- key: "{{ .Values.fediblockhole.conf_file.filename }}"
path: "{{ .Values.fediblockhole.conf_file.filename }}"
2023-01-21 23:56:35 +00:00
{{- end }}