Add deprecation notice to associated K8s endpoints API objects

Signed-off-by: Michael Shen <mishen@umich.edu>
This commit is contained in:
Michael Shen 2025-09-17 20:42:03 -07:00
parent 1703e54dfd
commit 9c525b84c4
No known key found for this signature in database
GPG Key ID: 12CC712F576BDFEE

View File

@ -32,6 +32,7 @@ import (
)
// Endpoints discovers new endpoint targets.
// Deprecated: The Endpoints API is deprecated starting in K8s v1.33+. Use EndpointSlice.
type Endpoints struct {
logger *slog.Logger
@ -51,7 +52,7 @@ type Endpoints struct {
}
// NewEndpoints returns a new endpoints discovery.
// Endpoints API is deprecated in k8s v1.33+, but we should still support it.
// Deprecated: The Endpoints API is deprecated starting in K8s v1.33+. Use NewEndpointSlice.
func NewEndpoints(l *slog.Logger, eps cache.SharedIndexInformer, svc, pod, node, namespace cache.SharedInformer, eventCount *prometheus.CounterVec) *Endpoints {
if l == nil {
l = promslog.NewNopLogger()