3
0
mirror of https://github.com/mastodon/chart synced 2025-05-17 20:43:21 +00:00

DRY the deploySearch settings names

This commit is contained in:
Matthew Abbott 2025-03-10 17:30:55 -05:00
parent 2cf807049f
commit fa4f97e77f
No known key found for this signature in database

View File

@ -47,7 +47,8 @@ spec:
- name: {{ include "mastodon.fullname" . }}-deploy-search
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.mastodon.hooks.deploySearch.resources }}
{{- with .Values.mastodon.hooks.deploySearch }}
{{- with .resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
@ -55,24 +56,25 @@ spec:
- bin/tootctl
- search
- deploy
{{- with .Values.mastodon.hooks.deploySearch.concurrency }}
{{- with .concurrency }}
- '--concurrency'
- {{ . | quote }}
{{- end }}
{{- if .Values.mastodon.hooks.deploySearch.resetChewy }}
{{- if .resetChewy }}
- '--reset-chewy'
{{- end }}
{{- with .Values.mastodon.hooks.deploySearch.batchSize }}
{{- with .batchSize }}
- '--batch-size'
- {{ . | quote }}
{{- end }}
{{- with .Values.mastodon.hooks.deploySearch.only }}
{{- with .only }}
{{- if not (has . (list "instances" "accounts" "tags" "statuses" "public_statuses")) -}}
{{ fail "mastodon.hooks.deploySearch.only: Value must be one of the following words: instances, accounts, tags, statuses, public_statuses"}}
{{- end }}
- '--only'
- {{ . | quote }}
{{- end }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "mastodon.fullname" . }}-env