Skip to content

Commit 194a448

Browse files
committed
Simplifies scale-1 runtime by disabling galera
1 parent 93c4de2 commit 194a448

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

variants/scale-1/galera.cnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[galera]
2+
wsrep_on=OFF

variants/scale-1/kustomization.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ resources:
66

77
patchesStrategicMerge:
88
- replicas-1.yaml
9-
- wsrep-1.yaml
9+
- wsrep-off.yaml
10+
11+
configMapGenerator:
12+
- name: conf-d
13+
behavior: merge
14+
files:
15+
- galera.cnf

variants/scale-1/wsrep-1.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

variants/scale-1/wsrep-off.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: mariadb
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: mariadb
10+
readinessProbe:
11+
exec:
12+
command:
13+
- mysqladmin
14+
- status
15+
initContainers:
16+
- name: init-config
17+
env:
18+
# So the init script can configure galera unconditionally; galera.cnf is overridden to disable wsrep
19+
- name: WSREP_CLUSTER_ADDRESS
20+
value: "gcomm://mariadb-0.mariadb"

0 commit comments

Comments
 (0)