mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
6adad71125
This is like a Möbius strip of code due to the fact that low-level components (serf/memberlist) are connected to high-level components (the catalog and mesh-gateways) in a twisty maze of references which make it hard to dive into. With that in mind here's a high level summary of what you'll find in the patch: There are several distinct chunks of code that are affected: * new flags and config options for the server * retry join WAN is slightly different * retry join code is shared to discover primary mesh gateways from secondary datacenters * because retry join logic runs in the *agent* and the results of that operation for primary mesh gateways are needed in the *server* there are some methods like `RefreshPrimaryGatewayFallbackAddresses` that must occur at multiple layers of abstraction just to pass the data down to the right layer. * new cache type `FederationStateListMeshGatewaysName` for use in `proxycfg/xds` layers * the function signature for RPC dialing picked up a new required field (the node name of the destination) * several new RPCs for manipulating a FederationState object: `FederationState:{Apply,Get,List,ListMeshGateways}` * 3 read-only internal APIs for debugging use to invoke those RPCs from curl * raft and fsm changes to persist these FederationStates * replication for FederationStates as they are canonically stored in the Primary and replicated to the Secondaries. * a special derivative of anti-entropy that runs in secondaries to snapshot their local mesh gateway `CheckServiceNodes` and sync them into their upstream FederationState in the primary (this works in conjunction with the replication to distribute addresses for all mesh gateways in all DCs to all other DCs) * a "gateway locator" convenience object to make use of this data to choose the addresses of gateways to use for any given RPC or gossip operation to a remote DC. This gets data from the "retry join" logic in the agent and also directly calls into the FSM. * RPC (`:8300`) on the server sniffs the first byte of a new connection to determine if it's actually doing native TLS. If so it checks the ALPN header for protocol determination (just like how the existing system uses the type-byte marker). * 2 new kinds of protocols are exclusively decoded via this native TLS mechanism: one for ferrying "packet" operations (udp-like) from the gossip layer and one for "stream" operations (tcp-like). The packet operations re-use sockets (using length-prefixing) to cut down on TLS re-negotiation overhead. * the server instances specially wrap the `memberlist.NetTransport` when running with gateway federation enabled (in a `wanfed.Transport`). The general gist is that if it tries to dial a node in the SAME datacenter (deduced by looking at the suffix of the node name) there is no change. If dialing a DIFFERENT datacenter it is wrapped up in a TLS+ALPN blob and sent through some mesh gateways to eventually end up in a server's :8300 port. * a new flag when launching a mesh gateway via `consul connect envoy` to indicate that the servers are to be exposed. This sets a special service meta when registering the gateway into the catalog. * `proxycfg/xds` notice this metadata blob to activate additional watches for the FederationState objects as well as the location of all of the consul servers in that datacenter. * `xds:` if the extra metadata is in place additional clusters are defined in a DC to bulk sink all traffic to another DC's gateways. For the current datacenter we listen on a wildcard name (`server.<dc>.consul`) that load balances all servers as well as one mini-cluster per node (`<node>.server.<dc>.consul`) * the `consul tls cert create` command got a new flag (`-node`) to help create an additional SAN in certs that can be used with this flavor of federation.
89 lines
3.7 KiB
Modula-2
89 lines
3.7 KiB
Modula-2
module github.com/hashicorp/consul
|
|
|
|
go 1.12
|
|
|
|
replace github.com/hashicorp/consul/api => ./api
|
|
|
|
replace github.com/hashicorp/consul/sdk => ./sdk
|
|
|
|
replace launchpad.net/gocheck => github.com/go-check/check v0.0.0-20140225173054-eb6ee6f84d0a
|
|
|
|
require (
|
|
github.com/Azure/go-autorest v10.15.3+incompatible // indirect
|
|
github.com/Microsoft/go-winio v0.4.3 // indirect
|
|
github.com/NYTimes/gziphandler v1.0.1
|
|
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
|
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
|
|
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878
|
|
github.com/armon/go-radix v1.0.0
|
|
github.com/aws/aws-sdk-go v1.25.41
|
|
github.com/coredns/coredns v1.1.2
|
|
github.com/digitalocean/godo v1.10.0 // indirect
|
|
github.com/docker/go-connections v0.3.0
|
|
github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0
|
|
github.com/envoyproxy/go-control-plane v0.8.0
|
|
github.com/go-ole/go-ole v1.2.1 // indirect
|
|
github.com/gogo/googleapis v1.1.0
|
|
github.com/gogo/protobuf v1.2.1
|
|
github.com/golang/protobuf v1.3.1
|
|
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf
|
|
github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2
|
|
github.com/hashicorp/consul/api v1.4.0
|
|
github.com/hashicorp/consul/sdk v0.4.0
|
|
github.com/hashicorp/go-bexpr v0.1.2
|
|
github.com/hashicorp/go-checkpoint v0.0.0-20171009173528-1545e56e46de
|
|
github.com/hashicorp/go-cleanhttp v0.5.1
|
|
github.com/hashicorp/go-connlimit v0.2.0
|
|
github.com/hashicorp/go-discover v0.0.0-20191202160150-7ec2cfbda7a2
|
|
github.com/hashicorp/go-hclog v0.12.0
|
|
github.com/hashicorp/go-memdb v1.0.3
|
|
github.com/hashicorp/go-msgpack v0.5.5
|
|
github.com/hashicorp/go-multierror v1.0.0
|
|
github.com/hashicorp/go-raftchunking v0.6.1
|
|
github.com/hashicorp/go-sockaddr v1.0.2
|
|
github.com/hashicorp/go-syslog v1.0.0
|
|
github.com/hashicorp/go-uuid v1.0.1
|
|
github.com/hashicorp/go-version v1.1.0
|
|
github.com/hashicorp/golang-lru v0.5.1
|
|
github.com/hashicorp/hcl v1.0.0
|
|
github.com/hashicorp/hil v0.0.0-20160711231837-1e86c6b523c5
|
|
github.com/hashicorp/memberlist v0.2.0
|
|
github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69
|
|
github.com/hashicorp/raft v1.1.2
|
|
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea
|
|
github.com/hashicorp/serf v0.9.0
|
|
github.com/hashicorp/vault/api v1.0.4
|
|
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
|
|
github.com/imdario/mergo v0.3.6
|
|
github.com/kr/text v0.1.0
|
|
github.com/miekg/dns v1.1.26
|
|
github.com/mitchellh/cli v1.0.0
|
|
github.com/mitchellh/copystructure v1.0.0
|
|
github.com/mitchellh/go-testing-interface v1.0.0
|
|
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452
|
|
github.com/mitchellh/mapstructure v1.1.2
|
|
github.com/mitchellh/reflectwalk v1.0.1
|
|
github.com/onsi/gomega v1.4.2 // indirect
|
|
github.com/pascaldekloe/goe v0.1.0
|
|
github.com/pkg/errors v0.8.1
|
|
github.com/prometheus/client_golang v0.9.2
|
|
github.com/ryanuber/columnize v2.1.0+incompatible
|
|
github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880
|
|
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
|
|
github.com/spf13/pflag v1.0.3 // indirect
|
|
github.com/stretchr/objx v0.1.1 // indirect
|
|
github.com/stretchr/testify v1.4.0
|
|
golang.org/x/crypto v0.0.0-20191106202628-ed6320f186d4
|
|
golang.org/x/net v0.0.0-20190923162816-aa69164e4478
|
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58
|
|
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9
|
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
|
google.golang.org/grpc v1.23.0
|
|
gopkg.in/square/go-jose.v2 v2.3.1
|
|
k8s.io/api v0.0.0-20190325185214-7544f9db76f6
|
|
k8s.io/apimachinery v0.0.0-20190223001710-c182ff3b9841
|
|
k8s.io/client-go v8.0.0+incompatible
|
|
)
|
|
|
|
replace istio.io/gogo-genproto v0.0.0-20190124151557-6d926a6e6feb => github.com/istio/gogo-genproto v0.0.0-20190124151557-6d926a6e6feb
|