Skip to content

Commit 050c32d

Browse files
committed
Add bitnami postgresql as helm dependency
- Use for alpha instances
1 parent 3597489 commit 050c32d

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

deploy/helm/ifrcgo-helm/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ dependencies:
1111
version: "20.7.1"
1212
repository: https://charts.bitnami.com/bitnami
1313
condition: redis.enabled
14+
- name: postgresql
15+
version: 16.4.9
16+
condition: postgresql.enabled
17+
repository: https://charts.bitnami.com/bitnami

deploy/helm/ifrcgo-helm/requirements.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ dependencies:
22
- name: redis
33
repository: https://charts.bitnami.com/bitnami
44
version: 20.7.1
5-
digest: sha256:1852c9489ae647e0394ccb39fa70787bb29ebbdbe24b89b914ce01a2adc6ff29
6-
generated: "2025-02-18T16:08:53.322089326+05:45"
5+
- name: postgresql
6+
repository: https://charts.bitnami.com/bitnami
7+
version: 16.4.9
8+
digest: sha256:ccb7b5c911cae85ec6358f0cf09db34c2fa53a0ebb11fa8ba0426ba991e89c18
9+
generated: "2025-02-18T16:12:59.123394069+05:45"

deploy/helm/ifrcgo-helm/templates/config/secret.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,22 @@ metadata:
99
type: Opaque
1010
stringData:
1111
DJANGO_SECRET_KEY: "{{ .Values.env.DJANGO_SECRET_KEY }}"
12-
DJANGO_DB_NAME: "{{ .Values.env.DJANGO_DB_NAME }}"
13-
DJANGO_DB_USER: "{{ .Values.env.DJANGO_DB_USER }}"
14-
DJANGO_DB_PASS: "{{ .Values.env.DJANGO_DB_PASS }}"
15-
DJANGO_DB_HOST: "{{ .Values.env.DJANGO_DB_HOST }}"
16-
DJANGO_DB_PORT: "{{ .Values.env.DJANGO_DB_PORT }}"
12+
13+
# Database
14+
{{- if .Values.postgresql.enabled }}
15+
DJANGO_DB_HOST: {{ include "postgresql.v1.primary.fullname" .Subcharts.postgresql }}
16+
DJANGO_DB_PORT: {{ include "postgresql.v1.service.port" .Subcharts.postgresql | quote }}
17+
DJANGO_DB_NAME: {{ .Values.postgresql.auth.database | quote }}
18+
DJANGO_DB_USER: {{ default "postgres" .Values.postgresql.auth.username | quote }}
19+
DJANGO_DB_PASS: {{ default .Values.postgresql.auth.postgresPassword .Values.postgresql.auth.password | quote }}
20+
{{- else }}
21+
DJANGO_DB_NAME: {{ .Values.env.DJANGO_DB_NAME | quote }}
22+
DJANGO_DB_USER: {{ .Values.env.DJANGO_DB_USER | quote }}
23+
DJANGO_DB_PASS: {{ .Values.env.DJANGO_DB_PASS | quote }}
24+
DJANGO_DB_HOST: {{ .Values.env.DJANGO_DB_HOST | quote }}
25+
DJANGO_DB_PORT: {{ .Values.env.DJANGO_DB_PORT | quote }}
26+
{{- end }}
27+
1728
AZURE_STORAGE_ACCOUNT: "{{ .Values.env.AZURE_STORAGE_ACCOUNT }}"
1829
AZURE_STORAGE_KEY: "{{ .Values.env.AZURE_STORAGE_KEY }}"
1930
EMAIL_API_ENDPOINT: "{{ .Values.env.EMAIL_API_ENDPOINT }}"

deploy/helm/ifrcgo-helm/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ redis:
102102
cpu: "1"
103103
memory: 2Gi
104104

105+
postgresql:
106+
enabled: false # XXX: Used for alpha instances running outside Azure
107+
fullnameOverride: "go-pg"
108+
architecture: standalone
109+
primary:
110+
persistence:
111+
enabled: true
112+
size: 8Gi
113+
105114
api:
106115
domain: "go-staging.ifrc.org"
107116
tls:

0 commit comments

Comments
 (0)