-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstatefulset.yaml
More file actions
109 lines (109 loc) · 2.98 KB
/
statefulset.yaml
File metadata and controls
109 lines (109 loc) · 2.98 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: allocdb
namespace: allocdb-system
labels:
app.kubernetes.io/name: allocdb
spec:
serviceName: allocdb-internal
replicas: 3
podManagementPolicy: Parallel
selector:
matchLabels:
app.kubernetes.io/name: allocdb
template:
metadata:
labels:
app.kubernetes.io/name: allocdb
spec:
terminationGracePeriodSeconds: 30
securityContext:
fsGroup: 65532
containers:
- name: allocdb
image: ghcr.io/skel84/allocdb:latest
imagePullPolicy: IfNotPresent
ports:
- name: control
containerPort: 17000
- name: client
containerPort: 18000
- name: protocol
containerPort: 19000
env:
- name: ALLOCDB_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ALLOCDB_STATEFULSET_NAME
value: allocdb
- name: ALLOCDB_HEADLESS_SERVICE
value: allocdb-internal
- name: ALLOCDB_CLUSTER_DOMAIN
value: cluster.local
- name: ALLOCDB_WORKSPACE_ROOT
value: /var/lib/allocdb
- name: ALLOCDB_RESOLVE_TIMEOUT_SECS
value: "30"
readinessProbe:
exec:
command:
- /usr/local/bin/allocdb-local-cluster
- control-status
- --addr
- 127.0.0.1:17000
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 6
livenessProbe:
exec:
command:
- /usr/local/bin/allocdb-local-cluster
- control-status
- --addr
- 127.0.0.1:17000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
startupProbe:
exec:
command:
- /usr/local/bin/allocdb-local-cluster
- control-status
- --addr
- 127.0.0.1:17000
periodSeconds: 2
timeoutSeconds: 2
failureThreshold: 30
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: "1"
memory: 1Gi
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- name: data
mountPath: /var/lib/allocdb
- name: run
mountPath: /run/allocdb
volumes:
- name: run
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi