]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/cephadm: document regex based host pattern 56221/head
authorAdam King <adking@redhat.com>
Sun, 5 Nov 2023 21:07:53 +0000 (16:07 -0500)
committerAdam King <adking@redhat.com>
Fri, 15 Mar 2024 14:09:52 +0000 (10:09 -0400)
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 62bd0b9368d4a53b15d9ecb665444dd943dbcfcf)

doc/cephadm/services/index.rst

index 82f83bfac8e7d50191264d485361e2e342b1af0c..c1da5d15f8955b2be7f7f5daa5bcd780bdff7751 100644 (file)
@@ -357,7 +357,9 @@ Or in YAML:
 Placement by pattern matching
 -----------------------------
 
-Daemons can be placed on hosts as well:
+Daemons can be placed on hosts using a host pattern as well.
+By default, the host pattern is matched using fnmatch which supports
+UNIX shell-style wildcards (see https://docs.python.org/3/library/fnmatch.html):
 
    .. prompt:: bash #
 
@@ -385,6 +387,26 @@ Or in YAML:
     placement:
       host_pattern: "*"
 
+The host pattern also has support for using a regex. To use a regex, you
+must either add "regex: " to the start of the pattern when using the
+command line, or specify a ``pattern_type`` field to be "regex"
+when using YAML.
+
+On the command line:
+
+.. prompt:: bash #
+
+ ceph orch apply prometheus --placement='regex:FOO[0-9]|BAR[0-9]'
+
+In YAML:
+
+.. code-block:: yaml
+
+    service_type: prometheus
+    placement:
+      host_pattern:
+        pattern: 'FOO[0-9]|BAR[0-9]'
+        pattern_type: regex
 
 Changing the number of daemons
 ------------------------------