Skip to content

Commit

Permalink
Add check for nodecontroller and locality being nil (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
aattuluri committed Jul 28, 2022
1 parent 1bffeaf commit 54cca3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admiral/pkg/clusters/serviceentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ func AddServiceEntriesWithDr(cache *AdmiralCache, sourceClusters map[string]stri

rc := rcs[sourceCluster]

if rc == nil {
log.Warnf(LogFormat, "Find", "remote-controller", sourceCluster, sourceCluster, "doesn't exist")
if rc == nil || rc.NodeController == nil || rc.NodeController.Locality == nil {
log.Warnf(LogFormat, "Find", "remote-controller", sourceCluster, sourceCluster, "locality not available for the cluster")
continue
}

Expand Down

0 comments on commit 54cca3f

Please sign in to comment.