Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Revisit Kustomize and Galera setup with MariaDB 10.5 #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
121 changes: 0 additions & 121 deletions 50mariadb.yml

This file was deleted.

5 changes: 5 additions & 0 deletions base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resources:
- mariadb-service.yaml
- mariadb-ready-service.yaml
- mysql-service.yaml
- mariadb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apiVersion: v1
kind: Service
metadata:
name: mariadb-ready
namespace: mysql
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "false"
spec:
Expand Down
1 change: 0 additions & 1 deletion 20mariadb-service.yml → base/mariadb-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apiVersion: v1
kind: Service
metadata:
name: mariadb
namespace: mysql
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
Expand Down
75 changes: 75 additions & 0 deletions base/mariadb-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mariadb
spec:
selector:
matchLabels:
app: mariadb
serviceName: "mariadb"
replicas: 1
podManagementPolicy: Parallel
template:
metadata:
labels:
app: mariadb
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9104"
spec:
terminationGracePeriodSeconds: 30
containers:
- name: mariadb
image: mariadb:10.5.8-focal@sha256:cdc553f0515a8d41264f0855120874e86761f7c69407b5cfbe49283dc195bea8
args:
- --character-set-server=utf8
- --collation-server=utf8_unicode_ci
env:
- name: MYSQL_ROOT_HOST
value: "localhost"
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "yes"
- name: MYSQL_INITDB_SKIP_TZINFO
value: "yes"
ports:
- containerPort: 3306
name: mysql
readinessProbe:
exec:
command:
- mysql
- -e
- "SHOW DATABASES;"
livenessProbe:
exec:
command:
- mysql
- -e
- "SHOW DATABASES;"
resources:
requests:
cpu: 10m
memory: 100Mi
volumeMounts:
- name: mysql
mountPath: /data
- name: initdb
mountPath: /docker-entrypoint-initdb.d
- name: metrics
image: prom/mysqld-exporter:v0.12.1@sha256:9fe9938c4ac9216cc24005144338f14fac4f604f139b481cc541bead008db3c1
env:
- name: DATA_SOURCE_NAME
value: root@(localhost:3306)/
ports:
- containerPort: 9104
volumes:
- name: initdb
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: mysql
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
1 change: 0 additions & 1 deletion 30mysql-service.yml → base/mysql-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: mysql
spec:
ports:
- port: 3306
Expand Down
6 changes: 0 additions & 6 deletions kustomization.yaml

This file was deleted.