Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions hack/helm_vars/postgresql/values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
auth:
postgresPassword: "posty-the-gres"
username: wire-server
password: "posty-the-gres"
primary:
version:
postgresql: "17"
cluster:
instances: 1
storage:
size: 8Gi
storageClass: {{ .Values.storageClass }}
resources:
requests:
cpu: 1
memory: 2Gi
limits: {}
extendedConfiguration: |
max_connections = 1500
monitoring:
enabled: false
postgresql:
parameters:
max_connections: "1500"
initdb:
database: wire-server
owner: dbadmin
backups:
enabled: false
6 changes: 3 additions & 3 deletions hack/helm_vars/wire-server/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ brig:
key: "ca.crt"
{{- end }}
postgresql:
host: "postgresql"
host: "postgresql-rw"
port: "5432"
user: wire-server
dbname: wire-server
Expand Down Expand Up @@ -288,7 +288,7 @@ galley:
key: "ca.crt"
{{- end }}
postgresql:
host: postgresql
host: postgresql-rw
port: "5432"
user: wire-server
dbname: wire-server
Expand Down Expand Up @@ -641,7 +641,7 @@ background-worker:
pushBackoffMaxWait: 500000 # 0.5s
remotesRefreshInterval: 1000000 # 1s
postgresql:
host: "postgresql"
host: "postgresql-rw"
port: "5432"
user: wire-server
dbname: wire-server
Expand Down
45 changes: 23 additions & 22 deletions hack/helmfile.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ repositories:
- name: groundhog2k
url: https://groundhog2k.github.io/helm-charts

- name: cnpg
url: https://cloudnative-pg.github.io/charts

releases:
- name: 'fake-aws'
namespace: '{{ .Values.namespace1 }}'
Expand Down Expand Up @@ -162,37 +165,35 @@ releases:

- name: "postgresql"
namespace: "{{ .Values.namespace1 }}"
chart: "bitnami/postgresql"
chart: "cnpg/cluster"
values:
- './helm_vars/bitnami.yaml'
- './helm_vars/postgresql/values.yaml.gotmpl'
- primary:
- cluster:
initdb:
scripts:
init.sql: |
CREATE DATABASE "wire-server";
CREATE DATABASE "dyn-1";
CREATE DATABASE "dyn-2";
CREATE DATABASE "dyn-3";

GRANT ALL PRIVILEGES ON DATABASE "wire-server" TO "wire-server";
GRANT ALL PRIVILEGES ON DATABASE "dyn-1" TO "wire-server";
GRANT ALL PRIVILEGES ON DATABASE "dyn-2" TO "wire-server";
GRANT ALL PRIVILEGES ON DATABASE "dyn-3" TO "wire-server";
postInitSQL:
- CREATE ROLE "wire-server" WITH LOGIN PASSWORD 'posty-the-gres'
- CREATE DATABASE "dyn-1"
- CREATE DATABASE "dyn-2"
- CREATE DATABASE "dyn-3"
- GRANT ALL PRIVILEGES ON DATABASE "dyn-1" TO "wire-server"
- GRANT ALL PRIVILEGES ON DATABASE "dyn-2" TO "wire-server"
- GRANT ALL PRIVILEGES ON DATABASE "dyn-3" TO "wire-server"
postInitApplicationSQL:
- GRANT ALL PRIVILEGES ON DATABASE "wire-server" TO "wire-server"
- GRANT ALL ON SCHEMA public TO "wire-server"

- name: "postgresql"
namespace: "{{ .Values.namespace2 }}"
chart: "bitnami/postgresql"
chart: "cnpg/cluster"
values:
- './helm_vars/bitnami.yaml'
- './helm_vars/postgresql/values.yaml.gotmpl'
- primary:
- cluster:
initdb:
scripts:
init.sql: |
CREATE DATABASE "wire-server";

GRANT ALL PRIVILEGES ON DATABASE "wire-server" TO "wire-server";
postInitSQL:
- CREATE ROLE "wire-server" WITH LOGIN PASSWORD 'posty-the-gres'
postInitApplicationSQL:
- GRANT ALL PRIVILEGES ON DATABASE "wire-server" TO "wire-server"
- GRANT ALL ON SCHEMA public TO "wire-server"

- name: 'opensearch-ephemeral'
namespace: '{{ .Values.namespace1 }}'
Expand Down