Merge pull request #2538 from mcwarman/istio-gateway-logging

istio-gateway: Add debug logging when endpoints missing
This commit is contained in:
Kubernetes Prow Robot 2022-04-27 01:00:11 -07:00 committed by GitHub
commit 042654c4cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,6 +171,11 @@ func (sc *gatewaySource) Endpoints(ctx context.Context) ([]*endpoint.Endpoint, e
return nil, err
}
if len(gwEndpoints) == 0 {
log.Debugf("No endpoints could be generated from gateway %s/%s", gateway.Namespace, gateway.Name)
continue
}
log.Debugf("Endpoints generated from gateway: %s/%s: %v", gateway.Namespace, gateway.Name, gwEndpoints)
sc.setResourceLabel(gateway, gwEndpoints)
endpoints = append(endpoints, gwEndpoints...)