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

41 lines
1.6 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:
2023-01-23 18:09:03 +00:00
- fediblock-sync
2023-01-22 00:20:16 +00:00
- -c
2023-01-24 17:38:18 +00:00
- "{{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}"
volumeMounts:
- name: config
mountPath: {{ include "fediblockhole.conf_file_path" . | quote }}
2023-01-24 18:37:56 +00:00
# subPath: {{ include "fediblockhole.conf_file_filename" . }}
2023-01-22 00:44:38 +00:00
volumes:
- name: config
configMap:
2023-01-23 17:10:34 +00:00
name: {{ include "fediblockhole.fullname" . }}-conf-toml
2023-01-22 00:44:38 +00:00
items:
2023-01-23 19:25:11 +00:00
- key: {{ include "fediblockhole.conf_file_filename" . | quote }}
2023-01-24 17:38:18 +00:00
path: {{ include "fediblockhole.conf_file_filename" . | quote }}
2023-01-21 23:56:35 +00:00
{{- end }}