Skip to content

Commit

Permalink
Add ability to use external PG (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
unxnn authored Nov 30, 2021
1 parent 1baf476 commit 0ffbc7c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/backend/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami/
version: 10.13.8
digest: sha256:fdac167862faff748ce16ae4203c9b3e7b45e2d13554c38435846ab884675a7c
generated: "2021-11-16T01:33:48.601845+02:00"
digest: sha256:fa60fe330271c390ce3a85e83c287366d16da2a4fad2b551403863d1ad9401a2
generated: "2021-11-30T17:27:43.075244+03:00"
5 changes: 3 additions & 2 deletions charts/backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: backend
version: 2.0.4
version: 2.0.5
appVersion: v2.0.0
kubeVersion: "^1.14.0-0"
kubeVersion: "^1.18.0-0"
description: The StakeWise backend application.
type: application
keywords:
Expand All @@ -16,6 +16,7 @@ dependencies:
- name: postgresql
version: 10.13.8
repository: https://charts.bitnami.com/bitnami/
condition: postgresql.enabled
maintainers:
- name: Dmitri Tsumak
email: dmitri@stakewise.io
4 changes: 1 addition & 3 deletions charts/backend/templates/common-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ metadata:
type: Opaque
data:
SECRET_KEY: {{ .Values.commonConf.secretKey | b64enc | quote }}
{{- $relname := .Release.Name -}}
{{- $relnamespace := .Release.Namespace -}}
{{- with .Values.postgresql }}
DATABASE_URL: {{ printf "postgres://%s:%s@%s-postgresql.%s.svc.cluster.local:%g/%s" .postgresqlUsername .postgresqlPassword $relname $relnamespace .service.port .postgresqlDatabase | b64enc | quote }}
DATABASE_URL: {{ printf "postgres://%s:%s@%s:%g/%s" .postgresqlUsername .postgresqlPassword .postgresqlHost .postgresqlPort .postgresqlDatabase | b64enc | quote }}
{{- end }}
NOTIFIERS_TELEGRAM_TOKEN: {{ .Values.commonConf.telegramToken | b64enc | quote }}
NOTIFIERS_TELEGRAM_CHAT_ID: {{ .Values.commonConf.telegramChatId | b64enc | quote }}
Expand Down
3 changes: 3 additions & 0 deletions charts/backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ polling:
pollUniswapPeriod: "60"

postgresql:
enabled: false
volumePermissions:
enabled: true
image:
Expand All @@ -331,6 +332,8 @@ postgresql:
name: postgresql
rbac:
create: false
postgresqlHost: "postgres"
postgresqlPort: "5432"
postgresqlUsername: "postgres"
postgresqlPassword: "postgres"
usePasswordFile: true
Expand Down

0 comments on commit 0ffbc7c

Please sign in to comment.