From a47bd57b4cf6754443a91fc538b3b3e24c1f196f Mon Sep 17 00:00:00 2001 From: Nikolai Nozhenko Date: Tue, 2 Jul 2024 01:04:36 +0200 Subject: [PATCH] add ability to set .spec.strategy for sentry-web, snuba-api and symbolicator-api --- sentry/templates/deployment-sentry-web.yaml | 6 ++++-- sentry/templates/deployment-snuba-api.yaml | 4 ++++ sentry/templates/deployment-symbolicator.yaml | 4 ++++ sentry/values.yaml | 16 +++++++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/sentry/templates/deployment-sentry-web.yaml b/sentry/templates/deployment-sentry-web.yaml index 5e07e3166..84a285604 100644 --- a/sentry/templates/deployment-sentry-web.yaml +++ b/sentry/templates/deployment-sentry-web.yaml @@ -10,13 +10,15 @@ metadata: heritage: "{{ .Release.Service }}" spec: revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - strategy: - type: {{ .Values.sentry.web.strategyType }} selector: matchLabels: app: {{ template "sentry.fullname" . }} release: "{{ .Release.Name }}" role: web +{{- if .Values.sentry.web.updateStrategy }} + strategy: + {{ toYaml .Values.sentry.web.updateStrategy | nindent 4 }} +{{- end }} {{- if not .Values.sentry.web.autoscaling.enabled }} replicas: {{ .Values.sentry.web.replicas }} {{- end }} diff --git a/sentry/templates/deployment-snuba-api.yaml b/sentry/templates/deployment-snuba-api.yaml index f0f0d952b..6bacae7f7 100644 --- a/sentry/templates/deployment-snuba-api.yaml +++ b/sentry/templates/deployment-snuba-api.yaml @@ -15,6 +15,10 @@ spec: app: {{ template "sentry.fullname" . }} release: "{{ .Release.Name }}" role: snuba-api +{{- if .Values.snuba.api.updateStrategy }} + strategy: + {{ toYaml .Values.snuba.api.updateStrategy | nindent 4 }} +{{- end }} {{- if not .Values.snuba.api.autoscaling.enabled }} replicas: {{ .Values.snuba.api.replicas }} {{- end }} diff --git a/sentry/templates/deployment-symbolicator.yaml b/sentry/templates/deployment-symbolicator.yaml index 4e9a4b45d..64a333c85 100644 --- a/sentry/templates/deployment-symbolicator.yaml +++ b/sentry/templates/deployment-symbolicator.yaml @@ -15,6 +15,10 @@ spec: app: {{ template "sentry.fullname" . }} release: "{{ .Release.Name }}" role: symbolicator-api +{{- if .Values.symbolicator.api.updateStrategy }} + strategy: + {{ toYaml .Values.symbolicator.api.updateStrategy | nindent 4 }} +{{- end }} {{- if not .Values.symbolicator.api.autoscaling.enabled }} replicas: {{ .Values.symbolicator.api.replicas }} {{- end }} diff --git a/sentry/values.yaml b/sentry/values.yaml index 18f0dd104..2664b354e 100644 --- a/sentry/values.yaml +++ b/sentry/values.yaml @@ -145,7 +145,11 @@ sentry: web: enabled: true # if using filestore backend filesystem with RWO access, set strategyType to Recreate - strategyType: RollingUpdate + updateStrategy: + type: RollingUpdate + # rollingUpdate: + # maxSurge: 1 + # maxUnavailable: 0 replicas: 1 env: [] probeFailureThreshold: 5 @@ -805,6 +809,11 @@ sentry: snuba: api: enabled: true + updateStrategy: + type: RollingUpdate + # rollingUpdate: + # maxSurge: 1 + # maxUnavailable: 0 replicas: 1 # set command to ["snuba","api"] if securityContext.runAsUser > 0 # see: https://github.com/getsentry/snuba/issues/956 @@ -1492,6 +1501,11 @@ symbolicator: enabled: false api: replicas: 1 + updateStrategy: + type: RollingUpdate + # rollingUpdate: + # maxSurge: 1 + # maxUnavailable: 0 env: [] probeInitialDelaySeconds: 10 resources: {}