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

Fallback to K8S API for getting pods, refactor logging for new warnings #150

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

LeaveMyYard
Copy link
Contributor

@LeaveMyYard LeaveMyYard commented Oct 6, 2023

Fallback to loading pods from KubeAPI in case some error occured with prometheus.
Raise a warning, as this results in missing some pods from the total calculation.

Note: previously (<= 1.4) KRR was loading pods from the API, and then loading deleted ones from prometheus (as only prometheus keeps track of historical objects). 1.5 introduced an optimization of loading everything only from prometheus, but some users (#127 (comment)) seem to not have some required metrics.

Added a section in a readme, describing what metrics are required to be present on a Prometheus, add a link to that in a CLI warning

@LeaveMyYard LeaveMyYard self-assigned this Oct 6, 2023
@LeaveMyYard LeaveMyYard changed the title Fallback get pods Fallback to K8S API for getting pods Oct 6, 2023
@LeaveMyYard LeaveMyYard marked this pull request as ready for review October 6, 2023 12:06
@LeaveMyYard LeaveMyYard changed the title Fallback to K8S API for getting pods Fallback to K8S API for getting pods, refactor logging for new warnings Oct 6, 2023
@LeaveMyYard LeaveMyYard linked an issue Oct 6, 2023 that may be closed by this pull request
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@LeaveMyYard LeaveMyYard requested a review from aantn October 9, 2023 13:59
@aantn aantn requested review from arikalon1 and removed request for aantn October 9, 2023 20:13
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

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

LGTM

Please fix Natan's comments on the documentation and merge

@LeaveMyYard LeaveMyYard merged commit 0f16f93 into main Oct 20, 2023
2 checks passed
@LeaveMyYard LeaveMyYard deleted the fallback-get-pods branch October 20, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants