1
0
Fork 0

use statefulset for mariadb

This commit is contained in:
Massaki Archambault 2020-05-06 20:05:40 -04:00
parent e5458602e6
commit b454e5ec1f
2 changed files with 13 additions and 22 deletions

View File

@ -1,5 +1,5 @@
resources:
- mariadb-deployment.yaml
- mariadb-statefulset.yaml
secretGenerator:
- name: mariadb-credentials-secret

View File

@ -1,13 +1,12 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: mariadb-deployment
name: mariadb-statefulset
spec:
selector:
matchLabels:
app: mariadb
strategy:
type: Recreate
serviceName: mariadb
template:
metadata:
labels:
@ -40,18 +39,10 @@ spec:
volumeMounts:
- name: mariadb-pvc
mountPath: /var/lib/mysql
volumes:
- name: mariadb-pvc
persistentVolumeClaim:
claimName: mariadb-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
volumeClaimTemplates:
- metadata:
name: mariadb-pvc
labels:
app: mariadb
spec:
spec:
accessModes:
- ReadWriteOnce
resources: