diff --git a/stable/sentry/Chart.yaml b/stable/sentry/Chart.yaml index 17db590f4a..40219a2563 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: 1.2.0 +version: 1.3.0 appVersion: 9.0 keywords: - debugging diff --git a/stable/sentry/README.md b/stable/sentry/README.md index 5679beeb70..a9e9595ded 100644 --- a/stable/sentry/README.md +++ b/stable/sentry/README.md @@ -108,6 +108,10 @@ The following table lists the configurable parameters of the Sentry chart and th | `postgresql.postgresHost` | External postgres host | `nil` | | `postgresql.postgresPassword` | External postgres password | `nil` | | `postgresql.postgresPort` | External postgres port | `5432` | +| `redis.enabled` | Deploy redis server (see below) | `true` | +| `redis.host` | External redis host | `nil` | +| `redis.password` | External redis password | `nil` | +| `redis.port` | External redis port | `6379` | | `persistence.enabled` | Enable persistence using PVC | `true` | | `persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | | `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | @@ -138,6 +142,10 @@ $ helm install --name my-release -f values.yaml stable/sentry By default, PostgreSQL is installed as part of the chart. To use an external PostgreSQL server set `postgresql.enabled` to `false` and then set `postgresql.postgresHost` and `postgresql.postgresPassword`. The other options (`postgresql.postgresDatabase`, `postgresql.postgresUser` and `postgresql.postgresPort`) may also want changing from their default values. +## Redis + +By default, Redis is installed as part of the chart. To use an external Redis server/cluster set `redis.enabled` to `false` and then set `redis.host`. If your redis cluster uses password define it with `redis.password`, otherwise just omit it. Check the table above for more configuration options. + ## Persistence The [Sentry](https://github.com/getsentry/docker-sentry) image stores the Sentry data at the `/var/lib/sentry/files` path of the container. diff --git a/stable/sentry/requirements.lock b/stable/sentry/requirements.lock index d630d73ded..e8a705a384 100644 --- a/stable/sentry/requirements.lock +++ b/stable/sentry/requirements.lock @@ -5,5 +5,5 @@ dependencies: - name: redis repository: https://kubernetes-charts.storage.googleapis.com/ version: 3.8.1 -digest: sha256:48cdc656a1a3a2951266a108ddd3b0a4b4d3ce2af2e8ea54d81d2f88641bc6a1 -generated: 2018-09-11T18:06:41.639986538-04:00 +digest: sha256:2e645b00617ba18fb9c6b03eb0b1a7b6c1c0b6272f654fc455ef623faeeba0df +generated: 2019-01-30T14:20:03.270355538+01:00 diff --git a/stable/sentry/requirements.yaml b/stable/sentry/requirements.yaml index f9fab760b6..1aa2b85202 100644 --- a/stable/sentry/requirements.yaml +++ b/stable/sentry/requirements.yaml @@ -6,3 +6,4 @@ dependencies: - name: redis version: 3.8.1 repository: https://kubernetes-charts.storage.googleapis.com/ + condition: redis.enabled diff --git a/stable/sentry/templates/_helpers.tpl b/stable/sentry/templates/_helpers.tpl index 1a26d6c652..a4ccfa84e7 100644 --- a/stable/sentry/templates/_helpers.tpl +++ b/stable/sentry/templates/_helpers.tpl @@ -70,3 +70,36 @@ Set postgres port {{- default "5432" .Values.postgresql.postgresPort | quote -}} {{- end -}} {{- end -}} + +{{/* +Set redis host +*/}} +{{- define "redis.host" -}} +{{- if .Values.redis.enabled -}} +{{- template "redis.fullname" . -}}-master +{{- else -}} +{{- .Values.redis.host | quote -}} +{{- end -}} +{{- end -}} + +{{/* +Set redis secret +*/}} +{{- define "redis.secret" -}} +{{- if .Values.redis.enabled -}} +{{- template "redis.fullname" . -}} +{{- else -}} +{{- template "fullname" . -}} +{{- end -}} +{{- end -}} + +{{/* +Set redis port +*/}} +{{- define "redis.port" -}} +{{- if .Values.redis.enabled -}} + "6379" +{{- else -}} +{{- default "6379" .Values.redis.port | quote -}} +{{- end -}} +{{- end -}} diff --git a/stable/sentry/templates/cron-deployment.yaml b/stable/sentry/templates/cron-deployment.yaml index 7ba1fdc6d4..3cd605eedf 100644 --- a/stable/sentry/templates/cron-deployment.yaml +++ b/stable/sentry/templates/cron-deployment.yaml @@ -69,19 +69,21 @@ spec: value: {{ template "postgresql.host" . }} - name: SENTRY_POSTGRES_PORT value: {{ template "postgresql.port" . }} + {{- if or (.Values.redis.enabled) (.Values.redis.password) }} - name: SENTRY_REDIS_PASSWORD valueFrom: secretKeyRef: {{- if .Values.redis.existingSecret }} name: {{ .Values.redis.existingSecret }} {{- else }} - name: {{ template "redis.fullname" . }} + name: {{ template "redis.secret" . }} {{- end }} key: redis-password + {{- end }} - name: SENTRY_REDIS_HOST - value: {{ template "redis.fullname" . }}-master + value: {{ template "redis.host" . }} - name: SENTRY_REDIS_PORT - value: "6379" + value: {{ template "redis.port" . }} - name: SENTRY_EMAIL_HOST value: {{ default "" .Values.email.host | quote }} - name: SENTRY_EMAIL_PORT diff --git a/stable/sentry/templates/hooks/db-init.job.yaml b/stable/sentry/templates/hooks/db-init.job.yaml index 83023f7018..fcf30f768f 100644 --- a/stable/sentry/templates/hooks/db-init.job.yaml +++ b/stable/sentry/templates/hooks/db-init.job.yaml @@ -53,19 +53,21 @@ spec: value: {{ template "postgresql.host" . }} - name: SENTRY_POSTGRES_PORT value: {{ template "postgresql.port" . }} + {{- if or (.Values.redis.enabled) (.Values.redis.password) }} - name: SENTRY_REDIS_PASSWORD valueFrom: secretKeyRef: {{- if .Values.redis.existingSecret }} name: {{ .Values.redis.existingSecret }} {{- else }} - name: {{ template "redis.fullname" . }} + name: {{ template "redis.secret" . }} {{- end }} key: redis-password + {{- end }} - name: SENTRY_REDIS_HOST - value: {{ template "redis.fullname" . }}-master + value: {{ template "redis.host" . }} - name: SENTRY_REDIS_PORT - value: "6379" + value: {{ template "redis.port" . }} - name: SENTRY_EMAIL_HOST value: {{ default "" .Values.smtpHost | quote }} - name: SENTRY_EMAIL_PORT diff --git a/stable/sentry/templates/hooks/user-create.job.yaml b/stable/sentry/templates/hooks/user-create.job.yaml index bf725f4bd3..9be9874c90 100644 --- a/stable/sentry/templates/hooks/user-create.job.yaml +++ b/stable/sentry/templates/hooks/user-create.job.yaml @@ -53,19 +53,21 @@ spec: value: {{ template "postgresql.host" . }} - name: SENTRY_POSTGRES_PORT value: {{ template "postgresql.port" . }} + {{- if or (.Values.redis.enabled) (.Values.redis.password) }} - name: SENTRY_REDIS_PASSWORD valueFrom: secretKeyRef: {{- if .Values.redis.existingSecret }} name: {{ .Values.redis.existingSecret }} {{- else }} - name: {{ template "redis.fullname" . }} + name: {{ template "redis.secret" . }} {{- end }} key: redis-password + {{- end }} - name: SENTRY_REDIS_HOST - value: {{ template "redis.fullname" . }}-master + value: {{ template "redis.host" . }} - name: SENTRY_REDIS_PORT - value: "6379" + value: {{ template "redis.port" . }} - name: SENTRY_EMAIL_HOST value: {{ default "" .Values.smtpHost | quote }} - name: SENTRY_EMAIL_PORT diff --git a/stable/sentry/templates/secrets.yaml b/stable/sentry/templates/secrets.yaml index 0a985b5a46..f3b48446ab 100644 --- a/stable/sentry/templates/secrets.yaml +++ b/stable/sentry/templates/secrets.yaml @@ -25,3 +25,6 @@ data: {{ if not .Values.postgresql.enabled }} postgres-password: {{ .Values.postgresql.postgresPassword | default "" | b64enc | quote }} {{ end }} + {{ if and (not .Values.redis.enabled) (.Values.redis.password) }} + redis-password: {{ .Values.redis.password | default "" | b64enc | quote }} + {{ end }} diff --git a/stable/sentry/templates/web-deployment.yaml b/stable/sentry/templates/web-deployment.yaml index 8cb87b6ff2..b8a1016a9b 100644 --- a/stable/sentry/templates/web-deployment.yaml +++ b/stable/sentry/templates/web-deployment.yaml @@ -68,19 +68,21 @@ spec: value: {{ template "postgresql.host" . }} - name: SENTRY_POSTGRES_PORT value: {{ template "postgresql.port" . }} + {{- if or (.Values.redis.enabled) (.Values.redis.password) }} - name: SENTRY_REDIS_PASSWORD valueFrom: secretKeyRef: {{- if .Values.redis.existingSecret }} name: {{ .Values.redis.existingSecret }} {{- else }} - name: {{ template "redis.fullname" . }} + name: {{ template "redis.secret" . }} {{- end }} key: redis-password + {{- end }} - name: SENTRY_REDIS_HOST - value: {{ template "redis.fullname" . }}-master + value: {{ template "redis.host" . }} - name: SENTRY_REDIS_PORT - value: "6379" + value: {{ template "redis.port" . }} - name: SENTRY_EMAIL_HOST value: {{ default "" .Values.email.host | quote }} - name: SENTRY_EMAIL_PORT diff --git a/stable/sentry/templates/workers-deployment.yaml b/stable/sentry/templates/workers-deployment.yaml index 6470447841..2f3754af87 100644 --- a/stable/sentry/templates/workers-deployment.yaml +++ b/stable/sentry/templates/workers-deployment.yaml @@ -69,19 +69,21 @@ spec: value: {{ template "postgresql.host" . }} - name: SENTRY_POSTGRES_PORT value: {{ template "postgresql.port" . }} + {{- if or (.Values.redis.enabled) (.Values.redis.password) }} - name: SENTRY_REDIS_PASSWORD valueFrom: secretKeyRef: {{- if .Values.redis.existingSecret }} name: {{ .Values.redis.existingSecret }} {{- else }} - name: {{ template "redis.fullname" . }} + name: {{ template "redis.secret" . }} {{- end }} key: redis-password + {{- end }} - name: SENTRY_REDIS_HOST - value: {{ template "redis.fullname" . }}-master + value: {{ template "redis.host" . }} - name: SENTRY_REDIS_PORT - value: "6379" + value: {{ template "redis.port" . }} - name: SENTRY_EMAIL_HOST value: {{ default "" .Values.email.host | quote }} - name: SENTRY_EMAIL_PORT diff --git a/stable/sentry/values.yaml b/stable/sentry/values.yaml index 8c63c01aca..666efab038 100644 --- a/stable/sentry/values.yaml +++ b/stable/sentry/values.yaml @@ -157,6 +157,12 @@ postgresql: enabled: true redis: + enabled: true + # Only used when internal redis is disabled + # host: redis + # Just omit the password field if your redis cluster doesn't use password + # password: redis + # port: 6379 master: persistence: enabled: true