From 9b6114c1925acd6ac305ed431920a53a82985734 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Mon, 27 Jul 2020 11:37:02 -0600 Subject: [PATCH] ceph: add 'ceph_daemon_type' label to pod labels This can help users identify the daemon type similarly to how 'ceph_daemon_id' helps identify the daemon ID. This also makes it so scripts users create don't have to parse "app=rook-ceph-" into "" if they desire that bit of info. Signed-off-by: Blaine Gardner --- pkg/operator/ceph/controller/spec.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/operator/ceph/controller/spec.go b/pkg/operator/ceph/controller/spec.go index 40b075700..dfa984982 100644 --- a/pkg/operator/ceph/controller/spec.go +++ b/pkg/operator/ceph/controller/spec.go @@ -312,6 +312,7 @@ func AppLabels(appName, namespace string) map[string]string { // Daemon ID is the ID portion of the Ceph daemon name: "a" for "mon.a"; "c" for "mds.c" func PodLabels(appName, namespace, daemonType, daemonID string) map[string]string { labels := AppLabels(appName, namespace) + labels["ceph_daemon_type"] = daemonType labels["ceph_daemon_id"] = daemonID // Also report the daemon id keyed by its daemon type: "mon: a", "mds: c", etc. labels[daemonType] = daemonID