open-nomad/command/agent/consul
Seth Hoenig 8b05efcf88 consul/connect: Add support for Connect terminating gateways
This PR implements Nomad built-in support for running Consul Connect
terminating gateways. Such a gateway can be used by services running
inside the service mesh to access "legacy" services running outside
the service mesh while still making use of Consul's service identity
based networking and ACL policies.

https://www.consul.io/docs/connect/gateways/terminating-gateway

These gateways are declared as part of a task group level service
definition within the connect stanza.

service {
  connect {
    gateway {
      proxy {
        // envoy proxy configuration
      }
      terminating {
        // terminating-gateway configuration entry
      }
    }
  }
}

Currently Envoy is the only supported gateway implementation in
Consul. The gateay task can be customized by configuring the
connect.sidecar_task block.

When the gateway.terminating field is set, Nomad will write/update
the Configuration Entry into Consul on job submission. Because CEs
are global in scope and there may be more than one Nomad cluster
communicating with Consul, there is an assumption that any terminating
gateway defined in Nomad for a particular service will be the same
among Nomad clusters.

Gateways require Consul 1.8.0+, checked by a node constraint.

Closes #9445
2021-01-25 10:36:04 -06:00
..
acl_testing.go comments: cleanup some leftover debug comments and such 2020-01-31 19:04:35 -06:00
catalog_testing.go consul/connect: dynamically select envoy sidecar at runtime 2020-10-13 09:14:12 -05:00
check_watcher.go client: improve group service stanza interpolation and check_re… (#6586) 2019-11-18 13:04:01 -05:00
check_watcher_test.go consul: add test for check watcher deadlock 2019-07-18 08:24:09 -07:00
config_entries_testing.go consul/connect: add initial support for ingress gateways 2020-08-21 16:21:54 -05:00
connect.go consul/connect: Add support for Connect terminating gateways 2021-01-25 10:36:04 -06:00
connect_proxies.go consul/connect: dynamically select envoy sidecar at runtime 2020-10-13 09:14:12 -05:00
connect_proxies_test.go consul/connect: dynamically select envoy sidecar at runtime 2020-10-13 09:14:12 -05:00
connect_proxies_testing.go consul/connect: dynamically select envoy sidecar at runtime 2020-10-13 09:14:12 -05:00
connect_test.go consul/connect: Add support for Connect terminating gateways 2021-01-25 10:36:04 -06:00
group_test.go consul/connect: fixup tests to use new consul sdk 2020-08-24 12:02:41 -05:00
int_test.go consul/connect: fixup tests to use new consul sdk 2020-08-24 12:02:41 -05:00
service_client.go consul/connect: Add support for Connect terminating gateways 2021-01-25 10:36:04 -06:00
service_client_test.go command/agent/consul: remove duplicated tests 2021-01-06 14:11:31 -05:00
structs.go Consul with CNI and host_network addresses (#9095) 2020-10-15 15:32:21 -04:00
testing.go client: improve group service stanza interpolation and check_re… (#6586) 2019-11-18 13:04:01 -05:00
unit_test.go command/agent/consul: remove duplicated tests 2021-01-06 14:11:31 -05:00
version_checker.go agent + consul 2018-09-13 10:43:40 -07:00
version_checker_test.go Replace Consul TLSSkipVerify handling 2018-03-14 17:43:06 -07:00