From 8c62763e41e440d53f580f09a3526f3d3a65dada Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Wed, 10 Jul 2024 15:15:34 +0200 Subject: [PATCH] Customize readiness path, update comments --- templates/deployment-sidekiq.yaml | 2 +- values.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index cacfe7a..e473c7d 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -207,7 +207,7 @@ spec: exec: command: - cat - - /var/www/tmp/sidekiq_process_has_started_and_will_begin_processing_jobs + - {{ required "A valid sidekiq readiness path is required." $context.Values.mastodon.sidekiq.readinessProbe.path }} initialDelaySeconds: {{ default 10 $context.Values.mastodon.sidekiq.readinessProbe.initialDelaySeconds }} periodSeconds: {{ default 2 $context.Values.mastodon.sidekiq.readinessProbe.periodSeconds }} successThreshold: {{ default 2 $context.Values.mastodon.sidekiq.readinessProbe.successThreshold }} diff --git a/values.yaml b/values.yaml index 3d66054..a081750 100644 --- a/values.yaml +++ b/values.yaml @@ -139,9 +139,11 @@ mastodon: # -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity affinity: {} # Rollout strategy to use when updating pods. - # Recreate is recommended for sidekiq pods for now because of possible data - # error between old/new versions. Please only use RollingUpdate if you are - # running a Mastodon version built after 2024-07-10. + # Recreate will help reduce the number of retried jobs when updating when + # the code introduces a new job as the pods are all replaced immediately. + # RollingUpdate can help with larger clusters if job retries aren't an + # issue, as it will reduce strain by replacing pods more slowly. It is + # strongly recommended to enable the readinessProbe when using RollingUpdate. # ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy updateStrategy: type: Recreate @@ -149,6 +151,7 @@ mastodon: # NOTE: Readiness probe will only work on versions of Mastodon built after 2024-07-10. readinessProbe: enabled: false + path: /opt/mastodon/tmp/sidekiq_process_has_started_and_will_begin_processing_jobs initialDelaySeconds: 10 periodSeconds: 2 successThreshold: 2