Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus workload loader #266

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4fedd82
Add multiple workload loaders, refactor kubeapi workload loader
LeaveMyYard Apr 22, 2024
c7ad1cd
Moved the logic from #93 for a new refined structure
LeaveMyYard Apr 22, 2024
bf90978
Implement remaining kinds in prometheus workload loader
LeaveMyYard Apr 24, 2024
7cd0c59
Filter Cronjob-created jobs from display
LeaveMyYard Apr 24, 2024
4044b4a
Fix cluster selector
LeaveMyYard Apr 25, 2024
b9a62a0
Minor bug fix
LeaveMyYard Apr 25, 2024
7e8f1f4
BaseClusterLoader, class structure change, not finished
LeaveMyYard Apr 29, 2024
4c1f5c9
Finished structure changes and workload loaders
LeaveMyYard Apr 30, 2024
7124c80
PrometeusClusterLoader.list_clusters implementation
LeaveMyYard Apr 30, 2024
d1ad17d
Minor additional logging improvements
LeaveMyYard Apr 30, 2024
f7d8412
Minor debug comment
LeaveMyYard Apr 30, 2024
09c372b
Merge branch 'main' into prometheus-workload-loader
LeaveMyYard Apr 30, 2024
59cc29d
Fix prometheus auto-discovery
LeaveMyYard Apr 30, 2024
d4adcf8
Merge branch 'prometheus-workload-loader' of https://github.com/robus…
LeaveMyYard Apr 30, 2024
eb84c95
Logging improvement
LeaveMyYard Apr 30, 2024
e350084
Add HPA detection for prometheus mode
LeaveMyYard May 2, 2024
d4e09b0
Fix tests
LeaveMyYard May 2, 2024
7b6be35
Rework ckyster selector for prometheus mode
LeaveMyYard May 2, 2024
dce207f
Remove test raise
LeaveMyYard May 2, 2024
43ffb7f
Fix HPAKey
LeaveMyYard May 3, 2024
2403898
One more HPAKey fix
LeaveMyYard May 3, 2024
73eb5f3
Deprecate --prometheus-cluster-label
aantn Jun 14, 2024
24af7f5
Bug fix - thank you @deutschj
aantn Jun 14, 2024
9fda8be
add TODO
aantn Jun 28, 2024
f71abd1
Fix ArgoRollouts (#308)
aantn Jul 1, 2024
66389e6
Prevent single errors from failing scan (#307)
aantn Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aantn I think this requires a change on the robusta-runner as well
see here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arikalon1 it should be fine. I'm not deprecating --prometheus-label, just adding another option with a name that makes more sense.

I did deprecate --prometheus-cluster-label but the runner doesn't pass that by default.

```

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this one I did change but if I understand the runner code correctly, it uses -l which is still supported and equivalent to this flag. So no change needed.

"-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
Loading