-
Notifications
You must be signed in to change notification settings - Fork 1
/
statefulset-1-node.yaml
54 lines (54 loc) · 1.52 KB
/
statefulset-1-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
53
54
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: 1
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=1", "-join-interval=1s", "-join-attempts=120"]
ports:
- containerPort: 4001
name: rqlite
readinessProbe:
httpGet:
scheme: HTTP
path: /readyz
port: 4001
periodSeconds: 5
timeoutSeconds: 2
# As rqlite manages a larger and larger dataset, it can take longer
# to be ready. This value may need to increase, depending on your experience.
initialDelaySeconds: 10
livenessProbe:
httpGet:
scheme: HTTP
path: /readyz?noleader
port: rqlite
initialDelaySeconds: 2
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