forked from spotahome/redis-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
topology-spread-contraints.yaml
41 lines (41 loc) · 1 KB
/
topology-spread-contraints.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
---
apiVersion: v1
kind: Namespace
metadata:
name: tsc
---
apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
name: redis-tsc
namespace: tsc
spec:
redis:
topologySpreadConstraints:
- labelSelector:
matchLabels:
app.kubernetes.io/component: redis
maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
- labelSelector:
matchLabels:
app.kubernetes.io/component: redis
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
sentinel:
replicas: 3
topologySpreadConstraints:
- labelSelector:
matchLabels:
app.kubernetes.io/component: sentinel
maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
- labelSelector:
matchLabels:
app.kubernetes.io/component: sentinel
maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway