1 {{ if .Values.mastodon.cron.removeMedia.enabled }}
2 apiVersion: batch/v1beta1
5 name: {{ include "mastodon.fullname" . }}-media-remove
7 {{- include "mastodon.labels" . | nindent 4 }}
9 schedule: {{ .Values.mastodon.cron.removeMedia.schedule }}
14 name: {{ include "mastodon.fullname" . }}-media-remove
16 restartPolicy: OnFailure
17 {{- if (not .Values.mastodon.s3.enabled) }}
18 # ensure we run on the same node as the other rails components; only
19 # required when using PVCs that are ReadWriteOnce
20 {{- if or (eq "ReadWriteOnce" .Values.mastodon.persistence.assets.accessMode) (eq "ReadWriteOnce" .Values.mastodon.persistence.system.accessMode) }}
23 requiredDuringSchedulingIgnoredDuringExecution:
30 topologyKey: kubernetes.io/hostname
34 persistentVolumeClaim:
35 claimName: {{ template "mastodon.fullname" . }}-assets
37 persistentVolumeClaim:
38 claimName: {{ template "mastodon.fullname" . }}-system
41 - name: {{ include "mastodon.fullname" . }}-media-remove
42 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
43 imagePullPolicy: {{ .Values.image.pullPolicy }}
50 name: {{ include "mastodon.fullname" . }}-env
52 name: {{ template "mastodon.fullname" . }}
57 {{- if .Values.postgresql.enabled }}
58 name: {{ .Release.Name }}-postgresql
60 name: {{ template "mastodon.fullname" . }}
62 key: postgresql-password
63 - name: "REDIS_PASSWORD"
66 name: {{ .Release.Name }}-redis
69 value: {{ .Values.mastodon.web.port | quote }}
70 {{- if (not .Values.mastodon.s3.enabled) }}
73 mountPath: /opt/mastodon/public/assets
75 mountPath: /opt/mastodon/public/system