Skip to content

Commit

Permalink
Adjust comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jukie committed Apr 4, 2024
1 parent 91cf02f commit e360996
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions control-plane/catalog/to-consul/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,9 @@ func (t *ServiceResource) registerServiceInstance(
}
}
for _, endpoint := range endpointSlice.Endpoints {
// From Kubernetes docs nil is an unknown state that can be interpreted as
// the endpoint being in a non-terminating state (assume ready or at least a state we shouldn't ignore)
// Ref: https://github.com/kubernetes/api/blob/5147c1a32f6a0b9b155bb84e59f933e0ff8a3792/discovery/v1/types.go#L129-L137
// Ignore endpoints in a terminating state
// nil represents an unknown state that can be interpreted as a non-terminating endpoint (assume ready or at least a state we shouldn't ignore)
// Ref: https://github.com/kubernetes/api/blob/5147c1a32f6a0b9b155bb84e59f933e0ff8a3792/discovery/v1/types.go#L128-L151
if endpoint.Conditions.Terminating == nil || !*endpoint.Conditions.Terminating {
for _, endpointAddr := range endpoint.Addresses {

Expand Down

0 comments on commit e360996

Please sign in to comment.