forked from daxio/k8s-lemp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmariadb-StatefulSet.yaml
88 lines (88 loc) · 1.83 KB
/
mariadb-StatefulSet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
apiVersion: v1
kind: Service
metadata:
name: mariadb
namespace: core
labels:
app: mariadb
spec:
ports:
- port: 3306
name: mysql
selector:
app: mariadb
tier: mysql-cache
clusterIP: None
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
creationTimestamp: null
labels:
app: mariadb
tier: mysql-cache
name: mariadb
namespace: core
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: mariadb
tier: mysql-cache
serviceName: mariadb
template:
metadata:
creationTimestamp: null
labels:
app: mariadb
tier: mysql-cache
spec:
containers:
- env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
key: mariadb-pass-root.txt
name: mariadb-pass-root
image: mariadb:10.3
imagePullPolicy: IfNotPresent
name: mariadb
ports:
- containerPort: 3306
name: mysql
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/mysql
name: mariadb-persistent-storage
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
creationTimestamp: null
labels:
app: mariadb
name: mariadb-persistent-storage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
selector:
matchLabels:
app: mariadb
storageClassName: slow
status:
phase: Pending
status:
replicas: 0