Skip to content

Commit

Permalink
update endpoint.address description
Browse files Browse the repository at this point in the history
Signed-off-by: Clayton Gonsalves <clayton.gonsalves@reddit.com>
  • Loading branch information
clayton-gonsalves committed Oct 13, 2023
1 parent 7513f92 commit 362a5ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/xdscache/v3/endpointslicetranslator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 362a5ca

Please sign in to comment.