Skip to content

Commit

Permalink
add endpoints and clusters for any clusters that were not created fro…
Browse files Browse the repository at this point in the history
…m walking the listener -> path
  • Loading branch information
jmurret committed Nov 7, 2023
1 parent 2e4d96f commit 70ff2f4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions agent/xdsv2/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,9 @@ func (g *ResourceGenerator) AllResourcesFromIR(proxyState *proxytracker.ProxySta
}

// Now account for Clusters that did not have a destination.
for name, cluster := range proxyState.Clusters {
for name := range proxyState.Clusters {
if _, ok := pr.envoyResources[xdscommon.ClusterType][name]; !ok {
envoyClusters, err := pr.makeClusters(name)
if err != nil {
return nil, fmt.Errorf("failed to generate xDS resources for cluster: %s. error: %v", cluster, err)
}

for name, envoyCluster := range envoyClusters {
pr.envoyResources[xdscommon.ClusterType][name] = envoyCluster
}
pr.addEnvoyClustersAndEndpointsToEnvoyResources(name)
}
}

Expand Down

0 comments on commit 70ff2f4

Please sign in to comment.