Add support for external Redis to the Sentry chart (#11010)

Signed-off-by: jonathanbeber <jonathanbeber@gmail.com>
This commit is contained in:
Jonathan Juares Beber
2019-01-31 02:50:33 -08:00
committed by Kubernetes Prow Robot
parent 1278759cd7
commit 12aad70c43
12 changed files with 79 additions and 18 deletions
+1 -1
View File
@@ -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
+8
View File
@@ -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.
+2 -2
View File
@@ -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
+1
View File
@@ -6,3 +6,4 @@ dependencies:
- name: redis
version: 3.8.1
repository: https://kubernetes-charts.storage.googleapis.com/
condition: redis.enabled
+33
View File
@@ -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 -}}
+5 -3
View File
@@ -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
@@ -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
@@ -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
+3
View File
@@ -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 }}
+5 -3
View File
@@ -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
@@ -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
+6
View File
@@ -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