-
Notifications
You must be signed in to change notification settings - Fork 7
/
percona-galera-xtradb.yaml
76 lines (76 loc) · 1.63 KB
/
percona-galera-xtradb.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
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
labels:
app: percona-galera
name: percona-galera
spec:
replicas: 1
selector:
matchLabels:
app: percona-galera
serviceName: percona-galera
template:
metadata:
labels:
app: percona-galera
spec:
containers:
- name: percona-galera
imagePullPolicy: Always
image: paulczar/percona-xtradb-cluster:5.7.19
env:
- name: CLUSTER_NAME
value: percona-galera
- name: MYSQL_ROOT_PASSWORD
value: not-a-secure-password
- name: K8S_SERVICE_NAME
value: percona-galera-xtradb
- name: LOG_TO_STDOUT
value: "true"
- name: DEBUG
value: "true"
livenessProbe:
exec:
command: ["mysqladmin", "-p$(MYSQL_ROOT_PASSWORD)", "ping"]
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
readinessProbe:
exec:
command: ["mysql", "-h", "127.0.0.1", "-p$(MYSQL_ROOT_PASSWORD)", "-e", "SELECT 1"]
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
labels:
app: percona-galera
name: percona-galera-xtradb
spec:
clusterIP: None
ports:
- name: galera-replication
port: 4567
- name: state-transfer
port: 4568
- name: state-snapshot
port: 4444
selector:
app: percona-galera
---
apiVersion: v1
kind: Service
metadata:
labels:
app: percona-galera
name: percona-galera
spec:
type: NodePort
ports:
- name: mysql
port: 3306
selector:
app: percona-galera