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

feat: Move endpoint ports into address metric #2503

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

mrueg
Copy link
Member

@mrueg mrueg commented Sep 22, 2024

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 22, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 22, 2024
@mrueg mrueg changed the title feat(endpoints): Move ports into address metric feat(endpoint): Move ports into address metric Sep 22, 2024
@CatherineF-dev
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 22, 2024
@CatherineF-dev
Copy link
Contributor

Do we need to add this breaking change into release notes later?

@mrueg
Copy link
Member Author

mrueg commented Sep 24, 2024

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.

@CatherineF-dev
Copy link
Contributor

/lgtm

@dgrisonnet
Copy link
Member

/triage accepted
/assign

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 3, 2024
@mrueg mrueg added this to the v2.14.0 milestone Oct 8, 2024
@mrueg
Copy link
Member Author

mrueg commented Oct 15, 2024

@rexagod @dgrisonnet are you okay with this? Then I'll start adjusting the tests.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2024
@mrueg
Copy link
Member Author

mrueg commented Oct 16, 2024

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.

@rexagod
Copy link
Member

rexagod commented Oct 16, 2024

I'd say so.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 17, 2024
@mrueg
Copy link
Member Author

mrueg commented Oct 17, 2024

I'd say so.

Thanks! This is now ready for review.

@mrueg mrueg changed the title feat(endpoint): Move ports into address metric feat: Move endpoint ports into address metric Oct 17, 2024
This marks kube_endpoint_ports as deprecated
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Oct 17, 2024
@rexagod
Copy link
Member

rexagod commented Oct 20, 2024

/lgtm

Thank you for all the great work, not just this PR, but everything! 🙇

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2024
@k8s-ci-robot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit e14a9d7 into kubernetes:main Oct 20, 2024
12 checks passed
philipgough added a commit to philipgough/kube-prometheus that referenced this pull request Nov 12, 2024
philipgough added a commit to prometheus-operator/kube-prometheus that referenced this pull request Nov 12, 2024
* [bot] [main] Automated version update

* Drops kube_endpoint_ports metric from KSM due to kubernetes/kube-state-metrics#2503

---------

Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube_endpoint_address duplicates with Prometheus 2.52
5 participants