From 362a5ca772477bdad7a68ef1aeba24266a40a3f0 Mon Sep 17 00:00:00 2001 From: Clayton Gonsalves Date: Fri, 13 Oct 2023 17:44:11 +0200 Subject: [PATCH] update endpoint.address description Signed-off-by: Clayton Gonsalves --- internal/xdscache/v3/endpointslicetranslator.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/xdscache/v3/endpointslicetranslator.go b/internal/xdscache/v3/endpointslicetranslator.go index 0fafcf53a48..f930fc42c00 100644 --- a/internal/xdscache/v3/endpointslicetranslator.go +++ b/internal/xdscache/v3/endpointslicetranslator.go @@ -76,6 +76,13 @@ func (c *EndpointSliceCache) RecalculateEndpoints(port, healthPort v1.ServicePor } // we can safely take the first element here. + // Refer k8s API description: + // The contents of this field are interpreted according to + // the corresponding EndpointSlice addressType field. + // Consumers must handle different types of addresses in the context + // of their own capabilities. This must contain at least one + // address but no more than 100. These are all assumed to be fungible + // and clients may choose to only use the first element. // Refer to: https://issue.k8s.io/106267 addr := envoy_v3.SocketAddress(endpoint.Addresses[0], int(*p.Port))