diff --git a/templates/job-deploy-search.yaml b/templates/job-deploy-search.yaml index 3cf7795..fbd53dc 100644 --- a/templates/job-deploy-search.yaml +++ b/templates/job-deploy-search.yaml @@ -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