Skip to content

Commit

Permalink
Deprecate --prometheus-cluster-label
Browse files Browse the repository at this point in the history
The name is misleading. Before this change we had both --prometheus-cluster-label and --prometheus-label which referred to very different things, leading to a bug in the code (to be fixed in the next commit).

We still support -l and have added support for  "--prometheus-cluster-value" which is what `-l` really represents.
  • Loading branch information
aantn committed Jun 14, 2024
1 parent 2403898 commit 73eb5f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ If your Prometheus monitors multiple clusters we require the label you defined f
For example, if your cluster has the Prometheus label `cluster: "my-cluster-name"`, then run this command:

```sh
krr.py simple --prometheus-label cluster -l my-cluster-name
krr.py simple --prometheus-cluster-key cluster -l my-cluster-name
```

You may also need the `-p` flag to explicitly give Prometheus' URL.
Expand Down
7 changes: 4 additions & 3 deletions robusta_krr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,16 @@ def run_strategy(
),
prometheus_cluster_label: Optional[str] = typer.Option(
None,
"--prometheus-cluster-label",
"--prometheus-cluster-value",
"-l",
help="The label in prometheus for your cluster. (Only relevant for centralized prometheus)",
help="The name of the cluster in Prometheus to scan. e.g. 'gke-prod-1'. Use with `--prometheus-cluster-key`. Only relevant for centralized prometheus.",
rich_help_panel="Prometheus Settings",
),
prometheus_label: str = typer.Option(
None,
"--prometheus-cluster-key",
"--prometheus-label",
help="The label in prometheus used to differentiate clusters. (Only relevant for centralized prometheus)",
help="The label in prometheus used to differentiate different clusters (e.g. 'cluster'). Only relevant for centralized prometheus.",
rich_help_panel="Prometheus Settings",
),
eks_managed_prom: bool = typer.Option(
Expand Down

0 comments on commit 73eb5f3

Please sign in to comment.