diff options
| author | Robusta Runner <aantny@gmail.com> | 2024-06-14 08:03:10 +0300 |
|---|---|---|
| committer | Robusta Runner <aantny@gmail.com> | 2024-06-14 08:03:10 +0300 |
| commit | 73eb5f3a7f1d284695fbe431985fbe674fad71c7 (patch) | |
| tree | af382b2589b56bc3640fd900bf9e2eeda31f4920 | |
| parent | 24038980696aa658ee790743d7b6fc8d85fc3bf0 (diff) | |
Deprecate --prometheus-cluster-label
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.
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | robusta_krr/main.py | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -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. diff --git a/robusta_krr/main.py b/robusta_krr/main.py index c64c0f4..021c9ef 100644 --- a/robusta_krr/main.py +++ b/robusta_krr/main.py @@ -138,15 +138,16 @@ def load_commands() -> None: ), 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( |
