Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 083c1e3

Browse files
author
Corneil du Plessis
authored
Fix mariadb and mysql deployment to ensure dataflow and skipper databases are created. (#5878)
Fixes #5876
1 parent ac17c98 commit 083c1e3

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/kubernetes/mariadb/mariadb-deployment.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: mariadb-configmap
5+
data:
6+
primary.sql: |
7+
CREATE DATABASE IF NOT EXISTS dataflow;
8+
CREATE DATABASE IF NOT EXISTS skipper;
9+
---
110
apiVersion: apps/v1
211
kind: Deployment
312
metadata:
@@ -35,12 +44,17 @@ spec:
3544
memory: 1Gi
3645
volumeMounts:
3746
- name: data
38-
mountPath: /var/lib/mariadb
47+
mountPath: /var/lib/mysql
48+
- name: initdb
49+
mountPath: /docker-entrypoint-initdb.d
3950
args:
4051
- "--ignore-db-dir=lost+found"
4152
- "--character-set-server=utf8mb4"
4253
- "--collation-server=utf8mb4_unicode_ci"
4354
volumes:
55+
- name: initdb
56+
configMap:
57+
name: mariadb-configmap
4458
- name: data
4559
persistentVolumeClaim:
4660
claimName: mariadb

src/kubernetes/mysql57/mysql-deployment.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: mysql-configmap
5+
data:
6+
primary.sql: |
7+
CREATE DATABASE IF NOT EXISTS dataflow;
8+
CREATE DATABASE IF NOT EXISTS skipper;
9+
---
110
apiVersion: apps/v1
211
kind: Deployment
312
metadata:
@@ -57,7 +66,12 @@ spec:
5766
volumeMounts:
5867
- name: data
5968
mountPath: /var/lib/mysql57
69+
- name: initdb
70+
mountPath: /docker-entrypoint-initdb.d
6071
volumes:
6172
- name: data
6273
persistentVolumeClaim:
6374
claimName: mysql57
75+
- name: initdb
76+
configMap:
77+
name: mysql-configmap

0 commit comments

Comments
 (0)