Skip to content

Commit

Permalink
Handle error when calculating endpoints for NEG.
Browse files Browse the repository at this point in the history
  • Loading branch information
prameshj committed Jul 20, 2020
1 parent 8934f68 commit 14b4814
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/neg/syncers/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ func (s *transactionSyncer) syncInternal() error {
s.logStats(currentMap, "after in-progress operations have completed, NEG endpoints")

targetMap, endpointPodMap, err := s.endpointsCalculator.CalculateEndpoints(ep.(*apiv1.Endpoints), currentMap)
if err != nil {
klog.Warningf("Failed to calculate endpoints for NEG key %q, Endpoints Calculator mode %s", s.NegSyncerKey.String(), s.endpointsCalculator.Mode())
return err
}
s.logStats(targetMap, "desired NEG endpoints")

// Calculate the endpoints to add and delete to transform the current state to desire state
Expand Down

0 comments on commit 14b4814

Please sign in to comment.