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

62 lines
2.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 }}
2023-02-08 19:29:49 +00:00
failedJobsHistoryLimit: {{ .Values.fediblockhole.cron.sync.failedJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.fediblockhole.cron.sync.successfulJobsHistoryLimit }}
2023-01-21 23:56:35 +00:00
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-02-21 19:35:06 +00:00
- name: allow
mountPath: {{ include "fediblockhole.allow_file_path" . | quote }}
2023-02-21 21:43:17 +00:00
{{- with .Values.fediblockhole.block_file }}
2023-02-21 19:35:06 +00:00
- name: block
2023-02-21 21:43:17 +00:00
mountPath: {{ .path | quote }}
2023-02-21 20:00:37 +00:00
{{ end }}
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-02-21 19:35:06 +00:00
- name: allow
configMap:
name: {{ include "fediblockhole.fullname" . }}-allow-csv
items:
- key: {{ include "fediblockhole.allow_file_filename" . | quote }}
path: {{ include "fediblockhole.allow_file_filename" . | quote }}
2023-02-21 21:43:17 +00:00
{{- with .Values.fediblockhole.block_file }}
2023-02-21 20:00:37 +00:00
- name: block
2023-02-21 19:35:06 +00:00
configMap:
name: {{ include "fediblockhole.fullname" . }}-block-csv
items:
2023-02-21 21:43:17 +00:00
- key: {{ .filename | quote }}
path: {{ .filename | quote }}
2023-02-21 20:00:37 +00:00
{{end }}
2023-01-21 23:56:35 +00:00
{{- end }}