Closed rjenkins closed 5 years ago
Note: You can ignore the build circle failure it is simply an error on docker push which I will fix later
Error parsing reference: "528451384384.dkr.ecr.us-west-2.amazonaws.com/emissary:eds/pubsub" is not a valid repository/tag: invalid reference format
Exited with code 1```
NOTE: This is a reviewer first pull request. Please read commit by commit, particularly because
eds.go
was edited extensively to removeEdsStreamHandler
. Each individual commit will be easy to read and include details about the changes in the commit message. i.e. If you just look at the file change foreds.go
it may be difficult to grok.This PR introduces the
consulEdsPoller
which provides publish/subscribe semantics for gRPC clients requesting EnvoyClusterLoadAssignment
data from Emissary. The data is fetched from consul in the form ofconsul-go []Endpoint
structs and converted to a protobufClusterLoadAssignment
which is encapsulated in aDiscoveryResponse
.Prior to this change each gRPC connection spawned a goroutine to query consul. Now each connection registers with the
consulEdsPoller
which consolidates querying of consul to a single goroutine and the results are fanned out to each connection.Additionally we fix Context in two key places. 1. We pass in the root context from the main func to eds and select on the Done channel. Secondly each gRPC conenction has its own context which we monitor Done for in it's
handle(consulEdsResult)
func.