Skip to content

Commit 4e220c6

Browse files
committed
Add persistent mariadb
1 parent 75a4887 commit 4e220c6

15 files changed

Lines changed: 192 additions & 9 deletions

File tree

apps/ergochat/config/ircd.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,10 +827,8 @@ datastore:
827827
port: 3306
828828
# if socket-path is set, it will be used instead of host:port
829829
#socket-path: "/var/run/mysqld/mysqld.sock"
830-
user: "ergochat"
831-
# Define ERGO__DATASTORE__MYSQL__PASSWORD in secret
832-
# password: "banana"
833-
history-database: "ergochat"
830+
# Values for `user` and `history-database` are defined in configmap
831+
# You have to define ERGO__DATASTORE__MYSQL__PASSWORD in secret
834832
timeout: 3s
835833
max-conns: 4
836834
# this may be necessary to prevent middleware from closing your connections:

apps/ergochat/templates/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ metadata:
55
labels:
66
app: ergochat
77
data:
8+
ERGO__DATASTORE__MYSQL__USER: "ergochat"
9+
ERGO__DATASTORE__MYSQL__HISTORY_DATABASE: "ergochat"
810
"auth.sh": |-
911
#!/bin/sh
1012
read input

apps/faf-lobby-server/templates/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ metadata:
66
app: faf-lobby-server
77
data:
88
CONFIGURATION_FILE: "/config/config.yaml"
9-
# Redundant, but required for rabbitmq init script
9+
# Redundant, but required for rabbitmq/mariadb init script
1010
MQ_USER: "faf-lobby-server"
11+
DB_LOGIN: "faf-python-server"
12+
DB_NAME: "faf_lobby"
1113
"config.yaml": |-
1214
{{ tpl ( .Files.Get "config/config.yaml" ) . | indent 4 }}

apps/faf-mariadb/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: v2
2+
name: faf-mariadb
3+
version: 1.0.0

apps/faf-replay-server/templates/config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ data:
88
RS_CONFIG_FILE: "/config/config.yaml"
99
RUST_LOG: "info"
1010
"config.yaml": |-
11-
{{ tpl ( .Files.Get "config/config.yaml") . | indent 4 }}
11+
{{ tpl ( .Files.Get "config/config.yaml") . | indent 4 }}
12+
# Just for mariadb init script! keep in sync with config file template
13+
RS_DB_USERNAME: "faf-legacy-live-replay-server"
14+
RS_DB_DATABASE: "faf_lobby"

apps/faf-user-service/templates/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ data:
2020
HYDRA_BASE_ADMIN_URL: "http://ory-hydra:4445"
2121
DB_URL: "jdbc:mariadb://mariadb:3306/faf_lobby?ssl=false"
2222
DB_USERNAME: "faf-user-service"
23+
DB_DATABASE: "faf_lobby" # for mariadb init script
2324
LOBBY_URL: "wss://ws.{{.Values.baseDomain}}"
2425
IRC_TOKEN_TTL: "300"

apps/ory-hydra/templates/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ data:
1111
URLS_CONSENT: "https://user.{{.Values.baseDomain}}/oauth2/consent"
1212
STRATEGIES_ACCESS_TOKEN: "jwt"
1313
OAUTH2_CLIENT_CREDENTIALS_DEFAULT_GRANT_ALLOWED_SCOPE: "true"
14+
# These are only used for mariadb init script, it is redundant in the DSN secret! Don't forget to also create a secret for DB_PASSWORD
15+
DB_USER: "hydra"
16+
DB_NAME: "hydra"

cluster/storage/values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ managedStorages:
88
# pvc:
99
# name: optional string, default is <pv.name>-pvc
1010
# namespace: faf-apps
11+
- pv:
12+
name: mariadb
13+
size: 100Gi
14+
pvc:
15+
namespace: faf-infra
1116
- pv:
1217
name: postgres
1318
size: 50Gi
@@ -83,6 +88,3 @@ managedStorages:
8388
size: 1Gi
8489
pvc:
8590
namespace: faf-apps
86-
# - name: mariadb
87-
# namespace: faf-apps
88-
# size: 20Gi

0 commit comments

Comments
 (0)