Skip to content

fix: Remove deprecated Endpoints store#2961

Open
rexagod wants to merge 1 commit into
kubernetes:mainfrom
rexagod:drop-endpoints
Open

fix: Remove deprecated Endpoints store#2961
rexagod wants to merge 1 commit into
kubernetes:mainfrom
rexagod:drop-endpoints

Conversation

@rexagod
Copy link
Copy Markdown
Member

@rexagod rexagod commented May 20, 2026

The v1 Endpoints API is deprecated in Kubernetes 1.33+ in favor of discovery.k8s.io/v1 EndpointSlice. When the endpoints resource is enabled, every List/Watch call triggers a deprecation warning that floods logs with ~10K+ repeated messages, obscuring genuinely important entries.

The endpointslices store has been the default since v2.14.0 and provides a superset of functionality. This removes the endpoints store entirely to eliminate the deprecation warning flood.

@rexagod rexagod requested review from Copilot and mrueg May 20, 2026 18:13
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 20, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 20, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: rexagod / name: Pranshu Srivastava (1c169ba)

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rexagod

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 20, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Instrumentation May 20, 2026
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated core/v1 Endpoints metrics store (and its documentation/tests) in favor of the existing EndpointSlice-based implementation to prevent Kubernetes deprecation warning log floods and keep kube-state-metrics aligned with supported APIs.

Changes:

  • Removed the Endpoints store implementation and its unit tests.
  • Updated the store builder and e2e tests to no longer reference/endow the Endpoints resource.
  • Removed Endpoint metrics documentation and the link from the docs index.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/e2e/main_test.go Drops endpoint from the set of known non-default resources in the e2e “default collector” assertions.
internal/store/endpoint.go Removes the Endpoints metric families and list/watch wiring.
internal/store/endpoint_test.go Removes unit tests for the Endpoints metrics output.
internal/store/builder.go Removes the endpoints store from availableStores and deletes the builder function.
docs/README.md Removes the “Endpoint Metrics” documentation link from the exposed metrics index.
docs/metrics/service/endpoint-metrics.md Deletes the Endpoint metrics reference page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/store/builder.go
Comment on lines 330 to 334
"cronjobs": func(b *Builder) []cache.Store { return b.buildCronJobStores() },
"daemonsets": func(b *Builder) []cache.Store { return b.buildDaemonSetStores() },
"deployments": func(b *Builder) []cache.Store { return b.buildDeploymentStores() },
"endpoints": func(b *Builder) []cache.Store { return b.buildEndpointsStores() },
"endpointslices": func(b *Builder) []cache.Store { return b.buildEndpointSlicesStores() },
"horizontalpodautoscalers": func(b *Builder) []cache.Store { return b.buildHPAStores() },
Comment thread internal/store/builder.go
Comment on lines 330 to 334
"cronjobs": func(b *Builder) []cache.Store { return b.buildCronJobStores() },
"daemonsets": func(b *Builder) []cache.Store { return b.buildDaemonSetStores() },
"deployments": func(b *Builder) []cache.Store { return b.buildDeploymentStores() },
"endpoints": func(b *Builder) []cache.Store { return b.buildEndpointsStores() },
"endpointslices": func(b *Builder) []cache.Store { return b.buildEndpointSlicesStores() },
"horizontalpodautoscalers": func(b *Builder) []cache.Store { return b.buildHPAStores() },
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 20, 2026
The v1 Endpoints API is deprecated in Kubernetes 1.33+ in favor of
discovery.k8s.io/v1 EndpointSlice. When the endpoints resource is
enabled, every List/Watch call triggers a deprecation warning that
floods logs with ~10K+ repeated messages, obscuring genuinely
important entries.

The endpointslices store has been the default since v2.14.0 and
provides a superset of functionality. This removes the endpoints
store entirely to eliminate the deprecation warning flood.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
@rexagod
Copy link
Copy Markdown
Member Author

rexagod commented May 20, 2026

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label May 20, 2026
@rexagod rexagod moved this from Needs Triage to Needs Approval in SIG Instrumentation May 20, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 20, 2026
@rexagod rexagod requested a review from Copilot May 20, 2026 18:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Status: Needs Approval

Development

Successfully merging this pull request may close these issues.

3 participants