From e06be9178e53b7549acfa44fbcaa2e86a04496b6 Mon Sep 17 00:00:00 2001 From: Matthew Abbott Date: Tue, 4 Feb 2025 15:14:15 -0600 Subject: [PATCH] Add flag for single-index "only" argument --- templates/job-deploy-search.yaml | 7 +++++++ values.yaml | 1 + 2 files changed, 8 insertions(+) diff --git a/templates/job-deploy-search.yaml b/templates/job-deploy-search.yaml index 7192edf..9aff1ab 100644 --- a/templates/job-deploy-search.yaml +++ b/templates/job-deploy-search.yaml @@ -66,6 +66,13 @@ spec: - '--batch-size' - {{ . | quote }} {{- end }} + {{- with .Values.mastodon.hooks.deploySearch.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 }} envFrom: - configMapRef: name: {{ include "mastodon.fullname" . }}-env diff --git a/values.yaml b/values.yaml index eced483..de4cac2 100644 --- a/values.yaml +++ b/values.yaml @@ -39,6 +39,7 @@ mastodon: enabled: false concurrency: 5 resetChewy: true + only: "" # one index name. Possible values: instances, accounts, tags, statuses, public_statuses # Upload website assets to S3 before deploying using rclone. # Whenever there is an update to Mastodon, sometimes there are assets files # that are renamed. As the pods are getting redeployed, and old/new pods are