feat: Move endpoint ports into address metric
What this PR does / why we need it:
This moves the labels from kube_endpoint_ports int kube_endpoint_address (as the subset in an endpoint can contain multiple addresses and ports that need to be linked together) This change also marks kube_endpoint_ports as deprecated
Fixes #2408
How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)
This change creates ports * addresses metrics instead of ports + addresses metrics.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2408
I will fix tests later once we have an agreement to move forward like this.
/lgtm
Do we need to add this breaking change into release notes later?
Do we need to add this breaking change into release notes later?
Yes, I'll make sure it's part of the changelog of the next release.
/lgtm
/triage accepted /assign
@rexagod @dgrisonnet are you okay with this? Then I'll start adjusting the tests.
What was the preference for empty labels again? Omit them?
e.g. port_name in this metric:
kube_endpoint_address{endpoint="single-port-endpoint",ip="10.0.0.1",namespace="default",port_name="",port_number="8080",port_protocol="TCP",ready="true"} 1
We keep it in kube_endpoint_ports.
/lgtm
Thank you for all the great work, not just this PR, but everything! 🙇
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: CatherineF-dev, mrueg, rexagod
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [mrueg,rexagod]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
(this is for people who come after me) I'm using 2.12.0 because kube 1.29.x, but the fix was put into kube-state-metrics 2.14.0 (for kube 1.31.x) and not backported. It's a moot point; kubernetes 1.30.x expires in April or July of this year, we'll be forced to upgrade and correspondingly upgrade kube-state-metrics.