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-<daemonType>" into "<daemonType>" if they desire that bit of info. Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
This commit is contained in:
1 file changed
+1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user