Skip to content

Commit

Permalink
support for labels fix opts
Browse files Browse the repository at this point in the history
  • Loading branch information
tombokombo committed Jun 30, 2024
1 parent b2314cf commit 5dac024
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prometheus_es_exporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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.')

Expand Down

0 comments on commit 5dac024

Please sign in to comment.