Skip to content

Commit 1c169ba

Browse files
committed
fix: Remove deprecated Endpoints store
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>
1 parent ffb37ae commit 1c169ba

6 files changed

Lines changed: 0 additions & 521 deletions

File tree

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ See each file for specific documentation about the exposed metrics:
3838
* [CronJob Metrics](metrics/workload/cronjob-metrics.md)
3939
* [DaemonSet Metrics](metrics/workload/daemonset-metrics.md)
4040
* [Deployment Metrics](metrics/workload/deployment-metrics.md)
41-
* [Endpoint Metrics](metrics/service/endpoint-metrics.md)
4241
* [Horizontal Pod Autoscaler Metrics](metrics/workload/horizontalpodautoscaler-metrics.md)
4342
* [Ingress Metrics](metrics/service/ingress-metrics.md)
4443
* [Job Metrics](metrics/workload/job-metrics.md)

docs/metrics/service/endpoint-metrics.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

internal/store/builder.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ var availableStores = map[string]func(f *Builder) []cache.Store{
330330
"cronjobs": func(b *Builder) []cache.Store { return b.buildCronJobStores() },
331331
"daemonsets": func(b *Builder) []cache.Store { return b.buildDaemonSetStores() },
332332
"deployments": func(b *Builder) []cache.Store { return b.buildDeploymentStores() },
333-
"endpoints": func(b *Builder) []cache.Store { return b.buildEndpointsStores() },
334333
"endpointslices": func(b *Builder) []cache.Store { return b.buildEndpointSlicesStores() },
335334
"horizontalpodautoscalers": func(b *Builder) []cache.Store { return b.buildHPAStores() },
336335
"ingresses": func(b *Builder) []cache.Store { return b.buildIngressStores() },
@@ -389,10 +388,6 @@ func (b *Builder) buildDeploymentStores() []cache.Store {
389388
return b.buildStoresFunc(deploymentMetricFamilies(b.allowAnnotationsList["deployments"], b.allowLabelsList["deployments"]), &appsv1.Deployment{}, createDeploymentListWatch, b.useAPIServerCache, b.objectLimit)
390389
}
391390

392-
func (b *Builder) buildEndpointsStores() []cache.Store {
393-
return b.buildStoresFunc(endpointMetricFamilies(b.allowAnnotationsList["endpoints"], b.allowLabelsList["endpoints"]), &v1.Endpoints{}, createEndpointsListWatch, b.useAPIServerCache, b.objectLimit)
394-
}
395-
396391
func (b *Builder) buildEndpointSlicesStores() []cache.Store {
397392
return b.buildStoresFunc(endpointSliceMetricFamilies(b.allowAnnotationsList["endpointslices"], b.allowLabelsList["endpointslices"]), &discoveryv1.EndpointSlice{}, createEndpointSliceListWatch, b.useAPIServerCache, b.objectLimit)
398393
}

internal/store/endpoint.go

Lines changed: 0 additions & 213 deletions
This file was deleted.

0 commit comments

Comments
 (0)