Skip to content

Commit

Permalink
Alerta web 0.1.3 (#21)
Browse files Browse the repository at this point in the history
* Added useExistingDatabase key

* Updated dependencies. Using bitnami-full-index

* Bump chart version
  • Loading branch information
hayk96 authored Feb 5, 2023
1 parent bcfe84d commit b647e37
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/alerta-web/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: v2
appVersion: "8.7.0"
description: A Helm chart for Kubernetes
name: alerta-web
version: 0.1.2
version: 0.1.3
home: https://github.com/hayk96/alerta-web
icon: https://raw.githubusercontent.com/hayk96/alerta-web/main/logo/mstile-310x310.png.png
dependencies:
- name: postgresql
version: "10.16.2"
repository: https://charts.bitnami.com/bitnami
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: postgresql.enabled
sources:
- https://github.com/alerta/alerta
Expand Down
4 changes: 4 additions & 0 deletions charts/alerta-web/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ data:
{{- end }}
{{ if .Values.postgresql.enabled -}}
DATABASE_URL = "postgresql://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.postgresqlDatabase }}"
{{ else if and (.Values.useExistingDatabase) (eq .Values.useExistingDatabase.type "postgresql") }}
{{ if eq .Values.useExistingDatabase.type "postgresql" }}
DATABASE_URL = "postgresql://{{- if .Values.useExistingDatabase.auth.enabled -}}{{ .Values.useExistingDatabase.auth.username }}:{{ .Values.useExistingDatabase.auth.password }}@{{- end -}}{{ .Values.useExistingDatabase.endpoint }}/{{ .Values.useExistingDatabase.database }}"
{{- end }}
{{- end }}
{{- if .Values.alertaWebUIConfig }}
config.js: |
Expand Down
10 changes: 10 additions & 0 deletions charts/alerta-web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,13 @@ postgresql:
persistence:
enabled: true
size: 1Gi

# Use already existing database. Currently, supported type is Postgres with version 11.x
useExistingDatabase: {}
# type: postgresql
# endpoint: example-postgresql.default.svc:5432
# database: EXISTING_DATABASE_NAME
# auth:
# enabled: true
# username: EXISTING_USERNAME
# password: EXISTING_PASSWORD

0 comments on commit b647e37

Please sign in to comment.