-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathredis-node2-rc.yaml
52 lines (50 loc) · 1.26 KB
/
redis-node2-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
apiVersion: v1
kind: ReplicationController
metadata:
name: redis-node-2
namespace: redis-sentinel
labels:
app: redis-node-2
spec:
replicas: 1
selector:
app: redis-node-2
template:
metadata:
labels:
app: redis-node-2
spec:
containers:
- name: redis-node
image: oberthur/docker-redis:3.2.5
imagePullPolicy: IfNotPresent
env:
- name: "REDIS_NODE_TYPE"
value: "SENTINEL_SLAVE"
- 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: "REDIS_CONFIG"
value: |
slave-announce-ip ${REDIS_NODE_2_SERVICE_HOST}
slave-announce-port ${REDIS_NODE_2_SERVICE_PORT}
appendonly no
ports:
- name: redis-port
containerPort: 6379
protocol: TCP
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 30
timeoutSeconds: 5