Skip to content

Commit

Permalink
avoid setting empty IP addresses (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanbanken committed Sep 25, 2024
1 parent ce53629 commit e68be25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/servicesync/servicesync_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ func serviceForPeer(peerService mcv1.PeerService, namespace string) (corev1.Serv
}

for _, host := range peerService.Endpoints {
if host.IPAddress == "" {
log.Info("empty IP address, skipping", "host", host.Hostname)
continue
}
addresses = append(addresses, corev1.EndpointAddress{IP: host.IPAddress})
}

Expand Down

0 comments on commit e68be25

Please sign in to comment.