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
|
2023-02-22 01:20:10 +00:00
|
|
|
mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- include "fediblockhole.conf_file_filename" . -}}"
|
|
|
|
subPath: "{{- include "fediblockhole.conf_file_filename" . -}}"
|
|
|
|
{{ if .Values.fediblockhole.allow_file.filename }}
|
|
|
|
- name: allowfile
|
|
|
|
mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- .Values.fediblockhole.allow_file.filename -}}"
|
|
|
|
subPath: "{{- .Values.fediblockhole.allow_file.filename -}}"
|
2023-02-22 00:29:42 +00:00
|
|
|
{{ end }}
|
2023-02-22 01:20:10 +00:00
|
|
|
{{ if .Values.fediblockhole.block_file.filename }}
|
|
|
|
- name: blockfile
|
|
|
|
mountPath: "{{- include "fediblockhole.conf_file_path" . -}}{{- .Values.fediblockhole.block_file.filename -}}"
|
|
|
|
subPath: "{{- .Values.fediblockhole.block_file.filename -}}"
|
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-22 01:20:10 +00:00
|
|
|
{{ if .Values.fediblockhole.allow_file.filename }}
|
|
|
|
- name: allowfile
|
2023-02-21 19:35:06 +00:00
|
|
|
configMap:
|
2023-02-22 01:20:10 +00:00
|
|
|
name: {{ include "fediblockhole.fullname" . }}-allow-csv
|
2023-02-21 19:35:06 +00:00
|
|
|
items:
|
2023-02-22 01:20:10 +00:00
|
|
|
- key: {{ .Values.fediblockhole.allow_file.filename | quote }}
|
|
|
|
path: {{ .Values.fediblockhole.allow_file.filename | quote }}
|
2023-02-22 00:29:42 +00:00
|
|
|
{{ end }}
|
2023-02-22 01:20:10 +00:00
|
|
|
{{ if .Values.fediblockhole.block_file.filename }}
|
|
|
|
- name: blockfile
|
2023-02-21 19:35:06 +00:00
|
|
|
configMap:
|
2023-02-22 01:20:10 +00:00
|
|
|
name: {{ include "fediblockhole.fullname" . }}-block-csv
|
2023-02-21 19:35:06 +00:00
|
|
|
items:
|
2023-02-22 01:20:10 +00:00
|
|
|
- key: {{ .Values.fediblockhole.block_file.filename | quote }}
|
|
|
|
path: {{ .Values.fediblockhole.block_file.filename | quote }}
|
|
|
|
{{ end }}
|
2023-01-21 23:56:35 +00:00
|
|
|
{{- end }}
|