pixie icon indicating copy to clipboard operation
pixie copied to clipboard

Remove usage of deprecated K8s v1 Endpoints API

Open ddelnano opened this issue 4 months ago • 0 comments

Describe the Task The vizier metadata service is currently using the deprecated v1 Endpoints API which is deprecated in Kubernetes v1.33+. The service is logging deprecation warnings:

app W0812 17:51:11.373392       1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice
app W0812 17:51:11.396926       1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice

This needs to be updated to use the newer discovery.k8s.io/v1 EndpointSlice API to ensure compatibility with future Kubernetes versions and eliminate deprecation warnings.

Code Locations The following files contain code using the deprecated v1 Endpoints API and should be further investigated to determine the set of changes necessary:

  1. k8s_metadata_utils.go:128-134 - startEndpointsWatcher function creates an informer using factory.Core().V1().Endpoints().Informer()
  2. k8s_metadata_utils.go:185-194 - endpointsConverter function converts v1.Endpoints objects
  3. k8s_metadata_handler.go:184 - Registers EndpointsUpdateProcessor
  4. k8s_metadata_handler.go:424-540 - EndpointsUpdateProcessor implementation that processes Endpoints updates
  5. proto_utils.go:470-493 - EndpointsToProto and EndpointsFromProto conversion functions
  6. k8s_metadata_controller_test.go:589 - Test code using CoreV1().Endpoints() interface

ddelnano avatar Aug 12 '25 20:08 ddelnano