Skip to content

Remove usage of deprecated K8s v1 Endpoints API #2258

@ddelnano

Description

@ddelnano

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions