From ea89956130ecab5ecce817c7710f255416b89017 Mon Sep 17 00:00:00 2001 From: Alex Nordlund Date: Sat, 26 Nov 2022 22:15:25 +0100 Subject: [PATCH] Add error message when scheduler queue has more than 1 replica --- templates/deployment-sidekiq.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index 3be193a..003c781 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -11,12 +11,13 @@ metadata: app.kubernetes.io/part-of: rails spec: {{- if (has "scheduler" .queues) }} - replicas: {{ min .replicas 1 }} + {{- if (gt (int .replicas) 1) }} + {{ fail "The scheduler queue should never have more than 1 replicas" }} + {{- end }} strategy: type: Recreate - {{- else }} - replicas: {{ .replicas }} {{- end }} + replicas: {{ .replicas }} selector: matchLabels: {{- include "mastodon.selectorLabels" $context | nindent 6 }}