-
Notifications
You must be signed in to change notification settings - Fork 327
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
control-plane: implement CDS and EDS for universal case #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge and iterate on this
} | ||
for _, dataplane := range dataplanes.Items { | ||
for _, inbound := range dataplane.Spec.Networking.GetInbound() { | ||
service := inbound.Tags[mesh_proto.ServiceTag] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should match also other tags.
return nil, err | ||
} | ||
|
||
edsClusterName := fmt.Sprintf("%s:%d", endpoint.DataplaneIP, endpoint.DataplanePort) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cluster name should be service name. Otherwise it will be really hard to read metrics later. It's common to do an aggregation by the service name from all Envoys.
@@ -66,9 +68,16 @@ func DefaultDataplaneSyncTracker(rt core_runtime.Runtime, reconciler SnapshotRec | |||
}, | |||
} | |||
|
|||
outbound, err := xds_topology.GetOutboundTargets(ctx, dataplane, rt.ResourceManager()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we do it for every dataplane every X seconds. This would be a bottleneck very soon (even with caching on resource store).
What I imagine is that we've got a job (Component=Runnable) that builds Cluster
and ClusterLoadAssignment
from Dataplanes
and expose it to the OutboundProxyGenerator
.
It's more efficient in CPU, because we do the matching once (every X second) and then OutboundProxyGenerator
can just retrieve this in O(1).
It's more efficient in memory. Every Snapshot will be stored in SnapshotCache. I don't know about Go but when I introduced reusing protos in java-control-plane based control plane, there performance went through the roof
envoyproxy/java-control-plane#98
changes:
universal
case