Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send partial update on scale to zero endpoints #17957

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions pilot/pkg/proxy/envoy/v2/eds.go
Expand Up @@ -465,11 +465,11 @@ func (s *DiscoveryServer) edsUpdate(clusterID, serviceName string, namespace str
if svcShards == 0 {
delete(s.EndpointShardsByService[serviceName], namespace)
}
adsLog.Infof("Full push, service %s has no endpoints", serviceName)
adsLog.Infof("Incremental push, service %s has no endpoints", serviceName)
s.ConfigUpdate(&model.PushRequest{
Full: true,
NamespacesUpdated: map[string]struct{}{namespace: {}},
ConfigTypesUpdated: map[string]struct{}{schemas.ServiceEntry.Type: {}},
Full: false,
NamespacesUpdated: map[string]struct{}{namespace: {}},
EdsUpdates: map[string]struct{}{serviceName: {}},
})
}
return
Expand Down
4 changes: 3 additions & 1 deletion pilot/pkg/proxy/envoy/v2/eds_test.go
Expand Up @@ -417,7 +417,9 @@ func edsUpdateInc(server *bootstrap.Server, adsc *adsc.ADSC, t *testing.T) {
// Wipe out all endpoints - expect full
server.EnvoyXdsServer.MemRegistry.SetEndpoints(edsIncSvc, "", []*model.IstioEndpoint{})

edsFullUpdateCheck(adsc, t)
if upd, err := adsc.Wait(15*time.Second, "eds"); err != nil {
t.Fatal("Expecting EDS update as part of a partial push", err, upd)
}

lbe := adsc.GetEndpoints()["outbound|8080||eds.test.svc.cluster.local"]
if len(lbe.Endpoints) != 0 {
Expand Down