Skip to content

Commit

Permalink
feat(deployments): make spec.revisionHistoryLimit configurable (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimeh authored Feb 16, 2024
1 parent e5b256d commit 8e5ab7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion templates/deployment-sidekiq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ spec:
type: Recreate
{{- end }}
replicas: {{ .replicas }}
revisionHistoryLimit: 2
{{- if (ne (toString $context.Values.mastodon.revisionHistoryLimit) "<nil>") }}
revisionHistoryLimit: {{ $context.Values.mastodon.revisionHistoryLimit }}
{{- end }}
selector:
matchLabels:
{{- include "mastodon.selectorLabels" $context | nindent 6 }}
Expand Down
4 changes: 3 additions & 1 deletion templates/deployment-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.mastodon.streaming.replicas }}
revisionHistoryLimit: 2
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
{{- end }}
selector:
matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }}
Expand Down
4 changes: 3 additions & 1 deletion templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ metadata:
{{- end }}
spec:
replicas: {{ .Values.mastodon.web.replicas }}
revisionHistoryLimit: 2
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
{{- end }}
selector:
matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }}
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ mastodon:
# with keys SECRET_KEY_BASE and OTP_SECRET and
# VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY
existingSecret: ""

# -- The number of old revisions to keep for each Deployment in Kubernetes.
# See https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#clean-up-policy
revisionHistoryLimit: 2

sidekiq:
# -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext
podSecurityContext: {}
Expand Down

0 comments on commit 8e5ab7c

Please sign in to comment.