fix runtime panic (#335)
This commit is contained in:
@@ -160,7 +160,7 @@ func (w *dockerSwarmWatcherImpl) listServices(ctx context.Context) ([]*routableS
|
|||||||
|
|
||||||
var result []*routableService
|
var result []*routableService
|
||||||
for _, service := range services {
|
for _, service := range services {
|
||||||
if service.Spec.EndpointSpec.Mode != swarmtypes.ResolutionModeVIP {
|
if service.Spec.EndpointSpec == nil || service.Spec.EndpointSpec.Mode != swarmtypes.ResolutionModeVIP {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if len(service.Endpoint.VirtualIPs) == 0 {
|
if len(service.Endpoint.VirtualIPs) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user