-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathredis-sentinel1-rc.yaml
62 lines (60 loc) · 1.77 KB
/
redis-sentinel1-rc.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
apiVersion: v1
kind: ReplicationController
metadata:
name: redis-sentinel-1
namespace: redis-sentinel
labels:
app: redis-sentinel
node-id: redis-sentinel-1
spec:
replicas: 1
selector:
app: redis-sentinel
node-id: redis-sentinel-1
template:
metadata:
labels:
app: redis-sentinel
node-id: redis-sentinel-1
spec:
containers:
- name: redis-sentinel
image: oberthur/docker-redis:3.2.5
imagePullPolicy: IfNotPresent
env:
- name: "REDIS_NODE_TYPE"
value: "SENTINEL"
- name: "SENTINEL_MASTER_ID"
value: "mymaster"
- name: "SENTINEL_SERVICE_HOST"
value: "${REDIS_SENTINEL_SERVICE_HOST}"
- name: "SENTINEL_SERVICE_PORT"
value: "${REDIS_SENTINEL_SERVICE_PORT}"
- name: "SENTINEL_INIT_MASTER_HOST"
value: "${REDIS_NODE_1_SERVICE_HOST}"
- name: "SENTINEL_INIT_MASTER_PORT"
value: "${REDIS_NODE_1_SERVICE_PORT}"
- name: "SENTINEL_CONFIG"
value: |
sentinel myid aaaabbbbccccddddeeee00000000000000000001
sentinel monitor ${SENTINEL_MASTER_ID} ${MASTER_IP} ${MASTER_PORT} 2
sentinel down-after-milliseconds ${SENTINEL_MASTER_ID} 20000
sentinel failover-timeout ${SENTINEL_MASTER_ID} 60000
sentinel parallel-syncs ${SENTINEL_MASTER_ID} 1
bind 0.0.0.0
ports:
- name: redis-sentinel
containerPort: 26379
protocol: TCP
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
livenessProbe:
tcpSocket:
port: 26379
initialDelaySeconds: 30
timeoutSeconds: 5