mirror of
https://github.com/status-im/consul.git
synced 2025-02-03 01:14:23 +00:00
website: clarify custom proxy integration and custom managed proxies
This commit is contained in:
parent
12a46cd996
commit
c809840c90
@ -147,6 +147,47 @@ with Connect. After natively integrating, the HTTP API or
|
|||||||
[DNS interface](/docs/agent/dns.html#connect-capable-service-lookups)
|
[DNS interface](/docs/agent/dns.html#connect-capable-service-lookups)
|
||||||
can be used.
|
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
|
||||||
|
|
||||||
Unmanaged proxies are regular Consul services that are registered as a
|
Unmanaged proxies are regular Consul services that are registered as a
|
||||||
|
@ -52,7 +52,8 @@ root certificates from the
|
|||||||
|
|
||||||
## Managed Mode Support
|
## 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
|
two environment variables that Consul populates on process startup. These
|
||||||
are both required to make the necessary API requests for configuration.
|
are both required to make the necessary API requests for configuration.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user