From 5dac024b6c98c8541107534bf8eab05c219bd383 Mon Sep 17 00:00:00 2001 From: tombo Date: Sun, 30 Jun 2024 21:15:23 +0200 Subject: [PATCH] support for labels fix opts --- prometheus_es_exporter/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prometheus_es_exporter/__init__.py b/prometheus_es_exporter/__init__.py index e5071b8..8e502ed 100644 --- a/prometheus_es_exporter/__init__.py +++ b/prometheus_es_exporter/__init__.py @@ -449,7 +449,7 @@ def kubeOperator(config_dir, es_cluster, opt_labels, queries_only): watch = kubernetes.watch.Watch() def filter_labels(cr_labels, opt_labels): - labels_list = [f"{key}={value}" for key, value in cr_labels.items()] + labels_list = [f"{key}:{value}" for key, value in cr_labels.items()] return any(label in labels_list for label in opt_labels) @@ -853,7 +853,7 @@ def load(self): @click.option('--filter-cr-labels', callback=indices_stats_indices_parser, help='Consider only reources which match label. ' - 'Labels should be separated by commas e.g. env=dev,app=base.') + 'Labels should be separated by commas e.g. env:dev,app:base.') @click.option('--operator-queries-only', default=False, is_flag=True, help='Only quries not templates CR.')