-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatefulset.yaml
75 lines (74 loc) · 1.64 KB
/
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
apiVersion: v1
kind: Service
metadata:
name: foundationdb
labels:
app: foundationdb
spec:
clusterIP: None
type: ClusterIP
ports:
- name: client
port: 4500
targetPort: 4500
selector:
app: foundationdb
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: foundationdb
labels:
app: foundationdb
spec:
serviceName: foundationdb
updateStrategy:
type: RollingUpdate
replicas: 2
template:
metadata:
labels:
app: foundationdb
spec:
containers:
- name: foundationdb
image: chr1st0ph/foundationdb
imagePullPolicy: Always
lifecycle:
postStart:
exec:
command:
- "sh"
- "-c"
- >
fdbcli --exec "configure new single memory" || true
resources:
limits:
cpu: "1"
requests:
cpu: "0.25"
memory: "1024Mi"
env:
- name: FDB_COORDINATORS_FQDN
value: "foundationdb-0.foundationdb.default.svc.cluster.local"
- name: FDB_CLUSTER_CONTENT
value: 1P2wnIMi:[email protected]:4500
# - name: FDB_DATACENTER_ID
# value: DC1
- name: FDB_MACHINE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
ports:
- name: client
containerPort: 4500
readinessProbe:
tcpSocket:
port: 4500
initialDelaySeconds: 3
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 4500
initialDelaySeconds: 3
periodSeconds: 20