From 9f6615033dc6fbb55d7a6f33123243c32f9d0e1f Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Fri, 25 Jun 2021 12:20:35 -0600 Subject: [PATCH] ceph: update cluster-on-pvc example for proper OSD scheduling The topology spread constraint example allowed scheduling even if the TSC could not be satisfied when scheduling the osd prepare jobs. This could lead to unevenly spread OSDs especially when the cluster was not using the zone labels. Now the topology will be required for scheduling, to ensure proper spread of the OSDs. Signed-off-by: Travis Nielsen --- cluster/examples/kubernetes/ceph/cluster-on-pvc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster/examples/kubernetes/ceph/cluster-on-pvc.yaml b/cluster/examples/kubernetes/ceph/cluster-on-pvc.yaml index 5542dc15e25e..23a7cafbf9d3 100644 --- a/cluster/examples/kubernetes/ceph/cluster-on-pvc.yaml +++ b/cluster/examples/kubernetes/ceph/cluster-on-pvc.yaml @@ -99,8 +99,9 @@ spec: topologyKey: kubernetes.io/hostname topologySpreadConstraints: - maxSkew: 1 + # IMPORTANT: If you don't have zone labels, change this to another key such as kubernetes.io/hostname topologyKey: topology.kubernetes.io/zone - whenUnsatisfiable: ScheduleAnyway + whenUnsatisfiable: DoNotSchedule labelSelector: matchExpressions: - key: app