From 7a87f336d37d8bf88e2bd48cdf5da8b26d9976a0 Mon Sep 17 00:00:00 2001 From: Andrey Voronkov Date: Thu, 26 Sep 2019 14:01:08 +0300 Subject: [PATCH] Fix inconsistent SENTRY_SECRET_KEY among the pods when not set explicitly. (#17385) Signed-off-by: Andrey Voronkov --- stable/sentry/Chart.yaml | 2 +- stable/sentry/README.md | 1 + stable/sentry/templates/cron-deployment.yaml | 1 + stable/sentry/templates/hooks/db-init.job.yaml | 2 ++ stable/sentry/templates/hooks/user-create.job.yaml | 2 ++ stable/sentry/templates/web-deployment.yaml | 1 + stable/sentry/templates/workers-deployment.yaml | 1 + 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stable/sentry/Chart.yaml b/stable/sentry/Chart.yaml index bd89a65b45..812baa42d3 100644 --- a/stable/sentry/Chart.yaml +++ b/stable/sentry/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Sentry is a cross-platform crash reporting and aggregation platform. name: sentry -version: 3.0.0 +version: 3.0.1 appVersion: 9.1.1 keywords: - debugging diff --git a/stable/sentry/README.md b/stable/sentry/README.md index 5b5ed44db5..4127444af5 100644 --- a/stable/sentry/README.md +++ b/stable/sentry/README.md @@ -66,6 +66,7 @@ Parameter | Description `image.tag` | Sentry image tag | `9.1.1` `imagePullPolicy` | Image pull policy | `IfNotPresent` `imagePullSecrets` | Specify image pull secrets | `[]` +`sentrySecret` | Specify SENTRY_SECRET_KEY. If isn't specified it will be generated automatically. | `nil` `web.podAnnotations` | Web pod annotations | `{}` `web.podLabels` | Worker pod extra labels | `{}` `web.replicacount` | Amount of web pods to run | `1` diff --git a/stable/sentry/templates/cron-deployment.yaml b/stable/sentry/templates/cron-deployment.yaml index c0f43f7729..20248ecab5 100644 --- a/stable/sentry/templates/cron-deployment.yaml +++ b/stable/sentry/templates/cron-deployment.yaml @@ -15,6 +15,7 @@ spec: metrics-enabled: {{ .Values.metrics.enabled | quote }} checksum/configYml: {{ .Values.config.configYml | sha256sum }} checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} + checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- if .Values.cron.podAnnotations }} {{ toYaml .Values.cron.podAnnotations | indent 8 }} {{- end }} diff --git a/stable/sentry/templates/hooks/db-init.job.yaml b/stable/sentry/templates/hooks/db-init.job.yaml index 7598ed1b02..9e644894bd 100644 --- a/stable/sentry/templates/hooks/db-init.job.yaml +++ b/stable/sentry/templates/hooks/db-init.job.yaml @@ -18,6 +18,8 @@ spec: template: metadata: name: "{{ .Release.Name }}-db-init" + annotations: + checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} labels: app: {{ template "sentry.fullname" . }} release: "{{ .Release.Name }}" diff --git a/stable/sentry/templates/hooks/user-create.job.yaml b/stable/sentry/templates/hooks/user-create.job.yaml index 2180e14c96..fc41908fc6 100644 --- a/stable/sentry/templates/hooks/user-create.job.yaml +++ b/stable/sentry/templates/hooks/user-create.job.yaml @@ -18,6 +18,8 @@ spec: template: metadata: name: "{{ .Release.Name }}-user-create" + annotations: + checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} labels: app: {{ template "sentry.fullname" . }} release: "{{ .Release.Name }}" diff --git a/stable/sentry/templates/web-deployment.yaml b/stable/sentry/templates/web-deployment.yaml index d9659caa93..bc1f313125 100644 --- a/stable/sentry/templates/web-deployment.yaml +++ b/stable/sentry/templates/web-deployment.yaml @@ -15,6 +15,7 @@ spec: metrics-enabled: {{ .Values.metrics.enabled | quote }} checksum/configYml: {{ .Values.config.configYml | sha256sum }} checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} + checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- if .Values.web.podAnnotations }} {{ toYaml .Values.web.podAnnotations | indent 8 }} {{- end }} diff --git a/stable/sentry/templates/workers-deployment.yaml b/stable/sentry/templates/workers-deployment.yaml index 9e379c8122..4d2cca0e33 100644 --- a/stable/sentry/templates/workers-deployment.yaml +++ b/stable/sentry/templates/workers-deployment.yaml @@ -15,6 +15,7 @@ spec: metrics-enabled: {{ .Values.metrics.enabled | quote }} checksum/configYml: {{ .Values.config.configYml | sha256sum }} checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} + checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- if .Values.worker.podAnnotations }} {{ toYaml .Values.worker.podAnnotations | indent 8 }} {{- end }}