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

Fix queries if node class label is added #99

Merged
merged 1 commit into from Nov 16, 2022

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Nov 14, 2022

Prometheus keeps series "alive" for 5 minutes after they get dropped from a scrape target. This leads to a slight overlap in the kube_node_labels metric if a node is relabelled.

This commit prioritises series having a node class label over series without.

This still does not work if a node class label changes from non-empty to non-empty but that should never happen. I don't think there is a generic way to handle this case.

Tested with LPG2 data at 2022-11-11 10:00:00Z.

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

Prometheus keeps series "alive" for 5 minutes after they get dropped from a scrape target. This leads to a slight overlap in the `kube_node_labels` metric if a node is relabeled.

This commit prioritizes series having a node class labels over series without.

This still does not work if a node class label changes from non-empty to non-empty but that should never happen. I don't think there is a generic way to handle this case.
@bastjan bastjan added the bug Something isn't working label Nov 14, 2022
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

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

LGTM

@bastjan bastjan merged commit 1e1a30a into master Nov 16, 2022
@bastjan bastjan deleted the fix-query-on-node-class-label-add branch November 16, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants