3
0
mirror of https://github.com/mastodon/chart synced 2025-05-18 04:53:21 +00:00

Allow customization of rollout strategies for deployments

This commit is contained in:
Tim Campbell 2024-07-09 15:05:15 +02:00
parent a695b425da
commit ec9e45afde
5 changed files with 28 additions and 13 deletions

View File

@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time # This is the chart version. This version number should be incremented each time
# you make changes to the chart and its templates, including the app version. # you make changes to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 5.1.3 version: 5.2.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to

View File

@ -18,8 +18,9 @@ spec:
{{- if (gt (int .replicas) 1) }} {{- if (gt (int .replicas) 1) }}
{{ fail "The scheduler queue should never have more than 1 replicas" }} {{ fail "The scheduler queue should never have more than 1 replicas" }}
{{- end }} {{- end }}
strategy: {{- end }}
type: Recreate {{- if $context.Values.mastodon.sidekiq.updateStrategy }}
strategy: {{- toYaml $context.Values.mastodon.sidekiq.updateStrategy | nindent 4 }}
{{- end }} {{- end }}
replicas: {{ .replicas }} replicas: {{ .replicas }}
{{- if (ne (toString $context.Values.mastodon.revisionHistoryLimit) "<nil>") }} {{- if (ne (toString $context.Values.mastodon.revisionHistoryLimit) "<nil>") }}

View File

@ -13,11 +13,9 @@ spec:
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }} {{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }} revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
{{- end }} {{- end }}
strategy: {{- if .Values.mastodon.web.updateStrategy }}
type: RollingUpdate strategy: {{- toYaml .Values.mastodon.web.updateStrategy | nindent 4 }}
rollingUpdate: {{- end }}
maxSurge: 10%
maxUnavailable: 25%
selector: selector:
matchLabels: matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }} {{- include "mastodon.selectorLabels" . | nindent 6 }}

View File

@ -13,11 +13,9 @@ spec:
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }} {{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }} revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
{{- end }} {{- end }}
strategy: {{- if .Values.mastodon.web.updateStrategy }}
type: RollingUpdate strategy: {{- toYaml .Values.mastodon.web.updateStrategy | nindent 4 }}
rollingUpdate: {{- end }}
maxSurge: 10%
maxUnavailable: 25%
selector: selector:
matchLabels: matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }} {{- include "mastodon.selectorLabels" . | nindent 6 }}

View File

@ -138,6 +138,10 @@ mastodon:
resources: {} resources: {}
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity # -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
affinity: {} affinity: {}
# Rollout strategy to use when updating pods
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: Recreate
# -- Topology spread constraints for Sidekiq Pods, overwrites .Values.topologySpreadConstraints # -- Topology spread constraints for Sidekiq Pods, overwrites .Values.topologySpreadConstraints
topologySpreadConstraints: {} topologySpreadConstraints: {}
# limits: # limits:
@ -227,6 +231,13 @@ mastodon:
replicas: 1 replicas: 1
# -- Affinity for Streaming Pods, overwrites .Values.affinity # -- Affinity for Streaming Pods, overwrites .Values.affinity
affinity: {} affinity: {}
# Rollout strategy to use when updating pods
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 10%
maxUnavailable: 25%
# -- Topology spread constraints for Streaming Pods, overwrites .Values.topologySpreadConstraints # -- Topology spread constraints for Streaming Pods, overwrites .Values.topologySpreadConstraints
topologySpreadConstraints: {} topologySpreadConstraints: {}
# -- Pod Security Context for Streaming Pods, overwrites .Values.podSecurityContext # -- Pod Security Context for Streaming Pods, overwrites .Values.podSecurityContext
@ -266,6 +277,13 @@ mastodon:
replicas: 1 replicas: 1
# -- Affinity for Web Pods, overwrites .Values.affinity # -- Affinity for Web Pods, overwrites .Values.affinity
affinity: {} affinity: {}
# Rollout strategy to use when updating pods
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 10%
maxUnavailable: 25%
# -- Topology spread constraints for Web Pods, overwrites .Values.topologySpreadConstraints # -- Topology spread constraints for Web Pods, overwrites .Values.topologySpreadConstraints
topologySpreadConstraints: {} topologySpreadConstraints: {}
# -- Pod Security Context for Web Pods, overwrites .Values.podSecurityContext # -- Pod Security Context for Web Pods, overwrites .Values.podSecurityContext