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: avoid panic in ksm-core ingresses collector #15623

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

clamoriniere
Copy link
Contributor

@clamoriniere clamoriniere commented Feb 15, 2023

What does this PR do?

Motivation

Fix possible panic in the kubernetes_state_core check, when a Kubernetes Ingress object with a resource
instead of a service inside .rules[].http.paths[].backend.

Additional Notes

Possible Drawbacks / Trade-offs

we update from v2.4.2 to v2.7.0 "kube-state-metrics" to benefit from the upstream fix. But it is not the only fix or code change. we need to be careful during the QA of this card on other kubernetes_state.* metrics generation.

Describe how to test/QA your changes

deploy the agent and cluster-agent with kubernetes_state_core enabled.
create an Ingress object with a rule defining using a resource instead of a service in .rules[].http.paths[].backend.
With this fix is should not panic.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

* Update kube-state-metrics dependencies to v2.7.0 to benefit from
  upstream fixes.
* Add kube-state-metrics patch on top of v.2.7.0 to make this version
  usage in the kubernetes_state_core check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants