blob: 768f56a5d562894167087b9b10b4aaeeebb1991c (
plain)
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
89
90
91
92
93
94
95
96
|
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: siridb
labels:
app: siridb
spec:
selector:
matchLabels:
app: siridb
serviceName: siridb
replicas: 2 # Multiple of 2, to create pools with two servers.
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
template:
metadata:
labels:
app: siridb
spec:
terminationGracePeriodSeconds: 120
dnsConfig:
searches:
- siridb.default.svc.cluster.local
tolerations: # wait 4 hour as synchronizing might take some time
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 14400
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 14400
containers:
- name: siridb
image: siridb/siridb-server:2.0.42 # Pin to a specific version
imagePullPolicy: Always
args: ["--managed"] # Tells SiriDB it will be managed by Kubernetes
env:
- name: SIRIDB_HTTP_STATUS_PORT
value: "8080"
- name: SIRIDB_HTTP_API_PORT
value: "9080"
- name: SIRIDB_ENABLE_SHARD_COMPRESSION
value: "1"
- name: SIRIDB_ENABLE_SHARD_AUTO_DURATION
value: "1"
- name: SIRIDB_BUFFER_SYNC_INTERVAL
value: "500"
- name: SIRIDB_DEFAULT_DB_PATH
value: /mnt/siridb/
- name: SIRIDB_BIND_SERVER_ADDRESS
value: "0.0.0.0"
- name: SIRIDB_BIND_CLIENT_ADDRESS
value: "0.0.0.0"
- name: SIRIDB_SERVER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- name: status
containerPort: 8080
- name: client
containerPort: 9000
- name: http
containerPort: 9080
- name: server
containerPort: 9010
volumeMounts:
- name: data
mountPath: /mnt/siridb/
resources:
requests:
memory: 100M # For example, 3Gi for large data sets
livenessProbe:
httpGet:
path: /healthy
port: 8080
initialDelaySeconds: 1800
periodSeconds: 20
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 20
periodSeconds: 20
timeoutSeconds: 10
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 200Mi # For example, 300Gi for large data sets
|