docs(discovery/service): Clarify multiple service definitions
Be more explicit that the definition of multiple services only works in config files, not using the HTTP API. Ref: https://discuss.hashicorp.com/t/register-multiple-services-via-put-request/
This commit is contained in:
parent
dcb5b924dc
commit
2558197260
|
@ -27,8 +27,8 @@ To configure a service, either provide the service definition as a
|
|||
`-config-file` option to the agent or place it inside the `-config-dir` of the
|
||||
agent. The file must end in the `.json` or `.hcl` extension to be loaded by
|
||||
Consul. Check definitions can be updated by sending a `SIGHUP` to the agent.
|
||||
Alternatively, the service can be registered dynamically using the [HTTP
|
||||
API](/api).
|
||||
Alternatively, the service can be [registered dynamically](/api-docs/agent/service#register-service)
|
||||
using the [HTTP API](/api).
|
||||
|
||||
A service definition is a configuration that looks like the following. This
|
||||
example shows all possible fields, but note that only a few are required.
|
||||
|
@ -71,7 +71,7 @@ example shows all possible fields, but note that only a few are required.
|
|||
"mode": "transparent",
|
||||
"transparent_proxy": {
|
||||
"outbound_listener_port": 22500
|
||||
}
|
||||
},
|
||||
"config": {},
|
||||
"upstreams": [],
|
||||
"mesh_gateway": {
|
||||
|
@ -275,8 +275,9 @@ deprecated and has been removed as of Consul 1.1.
|
|||
|
||||
## Multiple Service Definitions
|
||||
|
||||
Multiple services definitions can be provided at once using the plural
|
||||
`services` key in your configuration file.
|
||||
Multiple services definitions can be provided at once when registering services
|
||||
via the agent configuration by using the plural `services` key (registering
|
||||
multiple services in this manner is not supported using the HTTP API).
|
||||
|
||||
```javascript
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue