mirror of
https://github.com/wassname/ray.git
synced 2026-07-17 11:32:33 +08:00
On Kubernetes, set pod anti-affinity at the host level for pods of type 'ray' (#4131)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user