]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/rook: translate placement spec to node selector and vice versa
authorJoseph Sawaya <jsawaya@redhat.com>
Fri, 3 Sep 2021 14:24:24 +0000 (10:24 -0400)
committerJoseph Sawaya <jsawaya@redhat.com>
Mon, 13 Sep 2021 15:00:07 +0000 (11:00 -0400)
commit58d13a5dc44731b3f33450896790dd33f4c2bd53
treee3f39000f176de6661797a1447183d5abfb6945f
parent06c0a42bf7935713ce5e420197c58b19f2917243
mgr/rook: translate placement spec to node selector and vice versa

This commit creates methods for translating PlacementSpecs to NodeSelectors
and vice versa, this is a general method that would be used by orch commands that
have a placement option. It's able to translate specs that specify a label, hosts
and the host_pattern '*'.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
src/pybind/mgr/rook/rook_cluster.py
src/pybind/mgr/rook/tests/test_placement.py [new file with mode: 0644]