-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstatefulset-3-node.yaml
52 lines (52 loc) · 1.36 KB
/
statefulset-3-node.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rqlite
spec:
selector:
matchLabels:
app: rqlite # has to match .spec.template.metadata.labels
serviceName: rqlite-svc-internal
replicas: 3
podManagementPolicy: "Parallel"
template:
metadata:
labels:
app: rqlite # has to match .spec.selector.matchLabels
spec:
terminationGracePeriodSeconds: 10
containers:
- name: rqlite
image: rqlite/rqlite
args: ["-disco-mode=dns","-disco-config={\"name\":\"rqlite-svc-internal\"}","-bootstrap-expect=3", "-join-interval=1s", "-join-attempts=120"]
ports:
- containerPort: 4001
name: rqlite
readinessProbe:
httpGet:
scheme: HTTP
path: /readyz
port: 4001
periodSeconds: 5
timeoutSeconds: 2
initialDelaySeconds: 2
livenessProbe:
httpGet:
scheme: HTTP
path: /readyz?noleader
port: rqlite
initialDelaySeconds: 5
timeoutSeconds: 2
failureThreshold: 3
volumeMounts:
- name: rqlite-file
mountPath: /rqlite/file
volumeClaimTemplates:
- metadata:
name: rqlite-file
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 1Gi