On Kubernetes, set pod anti-affinity at the host level for pods of type 'ray' (#4131)

This commit is contained in:
Luke
2019-03-11 12:57:04 -07:00
committed by Robert Nishihara
parent 36cbde651a
commit 08a476932c
3 changed files with 36 additions and 0 deletions
+9
View File
@@ -31,11 +31,20 @@ spec:
selector:
matchLabels:
component: ray-head
type: ray
template:
metadata:
labels:
component: ray-head
type: ray
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoreDuringExecution:
- labelSelector:
matchLabels:
type: ray
topologyKey: kubernetes.io/hostname
containers:
- name: ray-head
image: rayproject/examples
+18
View File
@@ -31,11 +31,20 @@ spec:
selector:
matchLabels:
component: ray-head
type: ray
template:
metadata:
labels:
component: ray-head
type: ray
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoreDuringExecution:
- labelSelector:
matchLabels:
type: ray
topologyKey: kubernetes.io/hostname
containers:
- name: ray-head
image: rayproject/examples
@@ -68,11 +77,20 @@ spec:
selector:
matchLabels:
component: ray-worker
type: ray
template:
metadata:
labels:
component: ray-worker
type: ray
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoreDuringExecution:
- labelSelector:
matchLabels:
type: ray
topologyKey: kubernetes.io/hostname
containers:
- name: ray-worker
image: rayproject/examples
+9
View File
@@ -7,11 +7,20 @@ spec:
selector:
matchLabels:
component: ray-worker
type: ray
template:
metadata:
labels:
component: ray-worker
type: ray
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoreDuringExecution:
- labelSelector:
matchLabels:
type: ray
topologyKey: kubernetes.io/hostname
containers:
- name: ray-worker
image: rayproject/examples