use statefulset for mariadb
This commit is contained in:
parent
e5458602e6
commit
b454e5ec1f
|
@ -1,5 +1,5 @@
|
|||
resources:
|
||||
- mariadb-deployment.yaml
|
||||
- mariadb-statefulset.yaml
|
||||
|
||||
secretGenerator:
|
||||
- name: mariadb-credentials-secret
|
||||
|
|
|
@ -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:
|
Loading…
Reference in New Issue