website: clarify custom proxy integration and custom managed proxies

pull/4275/head
Mitchell Hashimoto 7 years ago committed by Jack Pearkes
parent 12a46cd996
commit c809840c90

@ -124,7 +124,7 @@ service.
"config": {
"upstreams": [{
"destination_name": "nearest-redis",
"destination_type": "prepared_query",
"destination_type": "prepared_query",
"local_bind_port": 1234
}]
}
@ -147,6 +147,47 @@ with Connect. After natively integrating, the HTTP API or
[DNS interface](/docs/agent/dns.html#connect-capable-service-lookups)
can be used.
### Custom Managed Proxy
[Custom proxies](/docs/connect/proxies/integrate.html) can also be
configured to run as a managed proxy. To configure custom proxies, specify
an alternate command to execute for the proxy:
```
{
"service": "web",
"connect": {
"proxy": {
"exec_mode": "daemon",
"command": ["/usr/bin/my-proxy", "-flag-example"]
}
}
}
}
```
The `exec_mode` value specifies how the proxy is executed. The only
supported value at this time is "daemon". The command is the binary and
any arguments to execute.
The "daemon" mode expects a proxy to run as a long-running, blocking
process. It should not double-fork into the background. The custom
proxy should retrieve its configuration (such as the port to run on)
via the [custom proxy integration APIs](/docs/connect/proxies/integrate.html).
The default proxy command can be changed at an agent-global level
in the agent configuration. An example in HCL format is shown below.
```
connect {
proxy_defaults {
command = ["/usr/bin/my-proxy"]
}
}
```
With this configuration, all services registered without an explicit
proxy command will use `my-proxy` instead of the default built-in proxy.
## Unmanaged Proxies
Unmanaged proxies are regular Consul services that are registered as a

@ -52,7 +52,8 @@ root certificates from the
## Managed Mode Support
If the proxy could run as a managed proxy, then it should accept the following
Any custom proxy can also run as a [custom managed proxy](/docs/connect/proxies.html#custom-managed-proxy).
If you want the proxy you're integrating to support this mode, then it should accept
two environment variables that Consul populates on process startup. These
are both required to make the necessary API requests for configuration.

Loading…
Cancel
Save