Skip to content

Commit

Permalink
Allow for better customization of readiness probe in sidekiq
Browse files Browse the repository at this point in the history
  • Loading branch information
timetinytim committed Jul 10, 2024
1 parent 5d67340 commit 08f9101
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
25 changes: 12 additions & 13 deletions templates/deployment-sidekiq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,18 @@ spec:
{{- with $context.Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
# NOTE: Readiness probe will only work on versions of Mastodon built after 2024-07-10.
# Will be un-commented once this is in an official release.
#
#readinessProbe:
# failureThreshold: 10
# exec:
# command:
# - cat
# - /var/www/tmp/sidekiq_process_has_started_and_will_begin_processing_jobs
# initialDelaySeconds: 10
# periodSeconds: 2
# successThreshold: 2
# timeoutSeconds: 1
{{- if $context.Values.mastodon.sidekiq.readinessProbe.enabled }}
readinessProbe:
failureThreshold: {{ default 10 $context.Values.mastodon.sidekiq.readinessProbe.failureThreshold }}
exec:
command:
- cat
- /var/www/tmp/sidekiq_process_has_started_and_will_begin_processing_jobs
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 }}
timeoutSeconds: {{ default 1 $context.Values.mastodon.sidekiq.readinessProbe.timeoutSeconds }}
{{- end }}
resources:
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
Expand Down
8 changes: 8 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ mastodon:
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: Recreate
# Readiness probe configuration
# NOTE: Readiness probe will only work on versions of Mastodon built after 2024-07-10.
readinessProbe:
enabled: false
initialDelaySeconds: 10
periodSeconds: 2
successThreshold: 2
timeoutSeconds: 1
# -- Topology spread constraints for Sidekiq Pods, overwrites .Values.topologySpreadConstraints
topologySpreadConstraints: {}
# limits:
Expand Down

0 comments on commit 08f9101

Please sign in to comment.