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

INC-31: Refactor the kube_pod_info label merging for all PrometheusRules #49

Merged
merged 1 commit into from
Mar 23, 2025

Conversation

jonathanio
Copy link
Contributor

Refactor the label merge for kube_pod_info to group by() () on only required information, which should remove potential duplicate entries on the left-hand side of the group_left query. This will resolve when the kube-state-metrics service is restarted due to a Node or Deployment upgrade, which results in new values for some labels, including instance, which breaks the mappings.

Checklist

Please check and confirm the following items have been performed, where
possible, for this Pull Request:

  • I have performed a self-review of my code and run any tests locally to check.
  • I have added tests that prove my changes are effective and work correctly.
  • I have made corresponding changes to the documentation as needed.
  • Each commit in, and this pull request, have meaningful subject & body for context.
  • I have added type/..., changes/..., and 'release/...' labels, as needed.

Refactor the label merge for kube_pod_info to group by on only required
information, which should remove potential duplicate entries on the
left-hand-side of the group_left query. This will resolve when the
kube-state-metrics service is restarted due to Node or Deployment
upgrade which results in new values for some labels, including instance,
which breaks the mappings.
@jonathanio jonathanio added priority/high This is a high-priority issue or pull reqest release/fix A fix for a bug or identified issue with this pull request type/refactoring A refactoring of existing code update/flux Update with improvements to the Flux Kustomizations labels Mar 23, 2025
@jonathanio jonathanio self-assigned this Mar 23, 2025
@jonathanio jonathanio merged commit dff8e3a into main Mar 23, 2025
5 checks passed
@jonathanio jonathanio deleted the inc-31-fix-pod-label-merging branch March 23, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high This is a high-priority issue or pull reqest release/fix A fix for a bug or identified issue with this pull request type/refactoring A refactoring of existing code update/flux Update with improvements to the Flux Kustomizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant