From: Joseph Sawaya Date: Fri, 3 Sep 2021 19:47:54 +0000 (-0400) Subject: mgr/rook: add placement specs to apply rgw X-Git-Tag: v17.1.0~781^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1c0b0758abec5e752df5f1477e8b03e2342689a;p=ceph-ci.git mgr/rook: add placement specs to apply rgw This commit adds the placement spec option when creating a CephObjectStore using `orch apply rgw`. Signed-off-by: Joseph Sawaya --- diff --git a/src/pybind/mgr/rook/rook_cluster.py b/src/pybind/mgr/rook/rook_cluster.py index f5cecfa52bc..5c701bd0a87 100644 --- a/src/pybind/mgr/rook/rook_cluster.py +++ b/src/pybind/mgr/rook/rook_cluster.py @@ -907,7 +907,7 @@ class RookCluster(object): # translate . to - (fingers crossed!) instead. name = spec.service_id.replace('.', '-') - + all_hosts = self.get_hosts() def _create_zone() -> cos.CephObjectStore: port = None secure_port = None @@ -926,7 +926,16 @@ class RookCluster(object): port=port, securePort=secure_port, instances=spec.placement.count or 1, - ) + placement=ccl.NodeAffinity( + requiredDuringSchedulingIgnoredDuringExecution=ccl.RequiredDuringSchedulingIgnoredDuringExecution( + nodeSelectorTerms=ccl.NodeSelectorTermsList( + [ + placement_spec_to_node_selector(spec.placement, all_hosts) + ] + ) + ) + ) + ), ) ) if spec.rgw_zone: