-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdynomite.statefulset.persistent.yml
122 lines (118 loc) · 3.03 KB
/
dynomite.statefulset.persistent.yml
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
110
111
112
113
114
115
116
117
118
119
120
121
apiVersion: v1
items:
- apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: dynomite
labels:
app: dynomite
spec:
# note that name to setup service below
serviceName: "dynomite"
replicas: 3
template:
metadata:
labels:
app: dynomite
deploymentconfig: dynomite
annotations:
pod.alpha.kubernetes.io/initialized: "true"
spec:
containers:
- image: smilelab/dagota
name: dagota
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
# note that name to setup service below
- name: DYN_SVC
value: dynomite
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
- image: smilelab/dynomite:latest
name: dynomite
ports:
- containerPort: 6379
protocol: TCP
readinessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 5
periodSeconds: 10
- image: redis
name: redis
command:
- "redis-server"
- "--port"
- "22122"
- "--protected-mode"
- "no"
ports:
- containerPort: 22122
protocol: TCP
readinessProbe:
tcpSocket:
port: 22122
livenessProbe:
exec:
command:
- "redis-cli"
- "-p"
- "22122"
- "ping"
initialDelaySeconds: 5
periodSeconds: 10
volumeMounts:
- name: redis-data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: redis-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
creationTimestamp: null
labels:
app: dynomite
# that name should be the same as
# in serviceName in statefulset above
name: dynomite
spec:
ports:
- name: redis
port: 6379
protocol: TCP
targetPort: 6379
# IMPORTANT, clusterIP to NONE
clusterIP: None
selector:
app: dynomite
deploymentconfig: dynomite
kind: List
metadata: {}