mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add support for an external Postgres DB to the sentry chart. (#7449)
The majority of this was done by jalberto here: https://github.com/helm/charts/pull/3376 Signed-off-by: Will Giddens <wgiddens@morristechnology.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
0d8aa34edd
commit
b73bf57fc2
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
description: Sentry is a cross-platform crash reporting and aggregation platform.
|
||||
name: sentry
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
appVersion: 9.0
|
||||
keywords:
|
||||
- debugging
|
||||
|
||||
+11
-3
@@ -12,9 +12,7 @@ $ helm install --wait stable/sentry
|
||||
|
||||
This chart bootstraps a [Sentry](https://sentry.io/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
It also packages the [PostgreSQL](https://github.com/kubernetes/charts/tree/master/stable/postgresql) and [Redis](https://github.com/kubernetes/charts/tree/master/stable/redis) which are required for Sentry.
|
||||
|
||||
> **Warning**: This chart does not yet allow for you to specify your own database host or redis host.
|
||||
It also optionally packages the [PostgreSQL](https://github.com/kubernetes/charts/tree/master/stable/postgresql) and [Redis](https://github.com/kubernetes/charts/tree/master/stable/redis) which are required for Sentry.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -104,6 +102,12 @@ The following table lists the configurable parameters of the Sentry chart and th
|
||||
| `ingress.annotations` | Ingress annotations | `{}` |
|
||||
| `ingress.hostname` | URL to address your Sentry installation | `sentry.local` |
|
||||
| `ingress.tls` | Ingress TLS configuration | `[]` |
|
||||
| `postgresql.enabled` | Deploy postgres server (see below) | `true` |
|
||||
| `postgresql.postgresDatabase` | Postgres database name | `sentry` |
|
||||
| `postgresql.postgresUser` | Postgres username | `sentry` |
|
||||
| `postgresql.postgresHost` | External postgres host | `nil` |
|
||||
| `postgresql.postgresPassword` | External postgres password | `nil` |
|
||||
| `postgresql.postgresPort` | External postgres port | `5432` |
|
||||
| `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) |
|
||||
@@ -130,6 +134,10 @@ $ helm install --name my-release -f values.yaml stable/sentry
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## PostgresSQL
|
||||
|
||||
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.
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Sentry](https://github.com/getsentry/docker-sentry) image stores the Sentry data at the `/var/lib/sentry/files` path of the container.
|
||||
|
||||
@@ -5,5 +5,5 @@ dependencies:
|
||||
- name: redis
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
version: 3.8.1
|
||||
digest: sha256:bb223efbf7741e16ea4090893c70d8f6a600b53e43ecb91c37c02d7c9205702c
|
||||
generated: 2018-09-05T20:53:38.493142607-07:00
|
||||
digest: sha256:48cdc656a1a3a2951266a108ddd3b0a4b4d3ce2af2e8ea54d81d2f88641bc6a1
|
||||
generated: 2018-09-11T18:06:41.639986538-04:00
|
||||
|
||||
@@ -2,6 +2,7 @@ dependencies:
|
||||
- name: postgresql
|
||||
version: 0.18.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: postgresql.enabled
|
||||
- name: redis
|
||||
version: 3.8.1
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
|
||||
@@ -37,3 +37,36 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- define "smtp.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "smtp" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Set postgres host
|
||||
*/}}
|
||||
{{- define "postgresql.host" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- template "postgresql.fullname" . -}}
|
||||
{{- else -}}
|
||||
{{- .Values.postgresql.postgresHost | quote -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Set postgres secret
|
||||
*/}}
|
||||
{{- define "postgresql.secret" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- template "postgresql.fullname" . -}}
|
||||
{{- else -}}
|
||||
{{- template "fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Set postgres port
|
||||
*/}}
|
||||
{{- define "postgresql.port" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
"5432"
|
||||
{{- else -}}
|
||||
{{- default "5432" .Values.postgresql.postgresPort | quote -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -53,22 +53,22 @@ spec:
|
||||
name: {{ template "fullname" . }}
|
||||
key: sentry-secret
|
||||
- name: SENTRY_DB_USER
|
||||
value: {{ default "sentry" .Values.postgresUser | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresUser | quote }}
|
||||
- name: SENTRY_DB_NAME
|
||||
value: {{ default "sentry" .Values.postgresDatabase | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresDatabase | quote }}
|
||||
- name: SENTRY_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.existingSecret }}
|
||||
name: {{ .Values.postgresql.existingSecret }}
|
||||
{{- else }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
name: {{ template "postgresql.secret" . }}
|
||||
{{- end }}
|
||||
key: postgres-password
|
||||
- name: SENTRY_POSTGRES_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
value: {{ template "postgresql.host" . }}
|
||||
- name: SENTRY_POSTGRES_PORT
|
||||
value: "5432"
|
||||
value: {{ template "postgresql.port" . }}
|
||||
- name: SENTRY_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -37,22 +37,22 @@ spec:
|
||||
name: {{ template "fullname" . }}
|
||||
key: sentry-secret
|
||||
- name: SENTRY_DB_USER
|
||||
value: {{ default "sentry" .Values.postgresUser | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresUser | quote }}
|
||||
- name: SENTRY_DB_NAME
|
||||
value: {{ default "sentry" .Values.postgresDatabase | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresDatabase | quote }}
|
||||
- name: SENTRY_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.existingSecret }}
|
||||
name: {{ .Values.postgresql.existingSecret }}
|
||||
{{- else }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
name: {{ template "postgresql.secret" . }}
|
||||
{{- end }}
|
||||
key: postgres-password
|
||||
- name: SENTRY_POSTGRES_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
value: {{ template "postgresql.host" . }}
|
||||
- name: SENTRY_POSTGRES_PORT
|
||||
value: "5432"
|
||||
value: {{ template "postgresql.port" . }}
|
||||
- name: SENTRY_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -37,22 +37,22 @@ spec:
|
||||
name: {{ template "fullname" . }}
|
||||
key: sentry-secret
|
||||
- name: SENTRY_DB_USER
|
||||
value: {{ default "sentry" .Values.postgresUser | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresUser | quote }}
|
||||
- name: SENTRY_DB_NAME
|
||||
value: {{ default "sentry" .Values.postgresDatabase | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresDatabase | quote }}
|
||||
- name: SENTRY_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.existingSecret }}
|
||||
name: {{ .Values.postgresql.existingSecret }}
|
||||
{{- else }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
name: {{ template "postgresql.secret" . }}
|
||||
{{- end }}
|
||||
key: postgres-password
|
||||
- name: SENTRY_POSTGRES_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
value: {{ template "postgresql.host" . }}
|
||||
- name: SENTRY_POSTGRES_PORT
|
||||
value: "5432"
|
||||
value: {{ template "postgresql.port" . }}
|
||||
- name: SENTRY_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -22,3 +22,6 @@ data:
|
||||
{{ else }}
|
||||
user-password: {{ randAlphaNum 16 | b64enc | quote }}
|
||||
{{ end }}
|
||||
{{ if not .Values.postgresql.enabled }}
|
||||
postgres-password: {{ .Values.postgresql.postgresPassword | default "" | b64enc | quote }}
|
||||
{{ end }}
|
||||
|
||||
@@ -11,6 +11,10 @@ metadata:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
|
||||
@@ -52,22 +52,22 @@ spec:
|
||||
name: {{ template "fullname" . }}
|
||||
key: sentry-secret
|
||||
- name: SENTRY_DB_USER
|
||||
value: {{ default "sentry" .Values.postgresUser | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresUser | quote }}
|
||||
- name: SENTRY_DB_NAME
|
||||
value: {{ default "sentry" .Values.postgresDatabase | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresDatabase | quote }}
|
||||
- name: SENTRY_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.existingSecret }}
|
||||
name: {{ .Values.postgresql.existingSecret }}
|
||||
{{- else }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
name: {{ template "postgresql.secret" . }}
|
||||
{{- end }}
|
||||
key: postgres-password
|
||||
- name: SENTRY_POSTGRES_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
value: {{ template "postgresql.host" . }}
|
||||
- name: SENTRY_POSTGRES_PORT
|
||||
value: "5432"
|
||||
value: {{ template "postgresql.port" . }}
|
||||
- name: SENTRY_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -53,22 +53,22 @@ spec:
|
||||
name: {{ template "fullname" . }}
|
||||
key: sentry-secret
|
||||
- name: SENTRY_DB_USER
|
||||
value: {{ default "sentry" .Values.postgresUser | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresUser | quote }}
|
||||
- name: SENTRY_DB_NAME
|
||||
value: {{ default "sentry" .Values.postgresDatabase | quote }}
|
||||
value: {{ default "sentry" .Values.postgresql.postgresDatabase | quote }}
|
||||
- name: SENTRY_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.existingSecret }}
|
||||
name: {{ .Values.postgresql.existingSecret }}
|
||||
{{- else }}
|
||||
name: {{ template "postgresql.fullname" . }}
|
||||
name: {{ template "postgresql.secret" . }}
|
||||
{{- end }}
|
||||
key: postgres-password
|
||||
- name: SENTRY_POSTGRES_HOST
|
||||
value: {{ template "postgresql.fullname" . }}
|
||||
value: {{ template "postgresql.host" . }}
|
||||
- name: SENTRY_POSTGRES_PORT
|
||||
value: "5432"
|
||||
value: {{ template "postgresql.port" . }}
|
||||
- name: SENTRY_REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -145,9 +145,14 @@ ingress:
|
||||
# TODO: add support for plugins https://docs.sentry.io/server/plugins/
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
postgresDatabase: sentry
|
||||
postgresUser: sentry
|
||||
imageTag: "9.5"
|
||||
# Only used when internal PG is disabled
|
||||
# postgresHost: postgres
|
||||
# postgresPassword: postgres
|
||||
# postgresPort: 5432
|
||||
imageTag: "9.6"
|
||||
persistence:
|
||||
enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user