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

44 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:
2023-01-23 18:09:03 +00:00
- fediblock-sync
2023-01-22 00:20:16 +00:00
- -c
2023-01-24 00:54:25 +00:00
- {{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}
2023-01-23 19:56:16 +00:00
# envFrom:
# - configMapRef:
# name: {{ include "fediblockhole.fullname" . }}-conf-toml
2023-01-22 00:28:56 +00:00
volumeMounts:
- name: config
2023-01-23 19:25:11 +00:00
mountPath: {{ include "fediblockhole.conf_file_path" . | quote }}
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 }}
path: {{ include "fediblockhole.conf_file_filename" . | quote }}
2023-01-21 23:56:35 +00:00
{{- end }}