Skip to content

Commit

Permalink
Fix mariadb and mysql deployment to ensure dataflow and skipper datab…
Browse files Browse the repository at this point in the history
…ases are created. (#5878)

Fixes #5876
  • Loading branch information
Corneil du Plessis authored Aug 1, 2024
1 parent ac17c98 commit 083c1e3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/kubernetes/mariadb/mariadb-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mariadb-configmap
data:
primary.sql: |
CREATE DATABASE IF NOT EXISTS dataflow;
CREATE DATABASE IF NOT EXISTS skipper;
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -35,12 +44,17 @@ spec:
memory: 1Gi
volumeMounts:
- name: data
mountPath: /var/lib/mariadb
mountPath: /var/lib/mysql
- name: initdb
mountPath: /docker-entrypoint-initdb.d
args:
- "--ignore-db-dir=lost+found"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
volumes:
- name: initdb
configMap:
name: mariadb-configmap
- name: data
persistentVolumeClaim:
claimName: mariadb
14 changes: 14 additions & 0 deletions src/kubernetes/mysql57/mysql-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-configmap
data:
primary.sql: |
CREATE DATABASE IF NOT EXISTS dataflow;
CREATE DATABASE IF NOT EXISTS skipper;
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -57,7 +66,12 @@ spec:
volumeMounts:
- name: data
mountPath: /var/lib/mysql57
- name: initdb
mountPath: /docker-entrypoint-initdb.d
volumes:
- name: data
persistentVolumeClaim:
claimName: mysql57
- name: initdb
configMap:
name: mysql-configmap

0 comments on commit 083c1e3

Please sign in to comment.