Support multiple namespaces in the Nomad Provider
This commit is contained in:
parent
4bd055cf97
commit
d6b69e1347
20 changed files with 227 additions and 25 deletions
|
@ -442,24 +442,65 @@ For additional information, refer to [Restrict the Scope of Service Discovery](.
|
|||
|
||||
### `namespace`
|
||||
|
||||
??? warning "Deprecated in favor of the [`namespaces`](#namespaces) option."
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
The `namespace` option defines the namespace in which the Nomad services will be discovered.
|
||||
|
||||
!!! warning
|
||||
|
||||
One should only define either the `namespaces` option or the `namespace` option.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
nomad:
|
||||
namespace: "production"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.nomad]
|
||||
namespace = "production"
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.nomad.namespace=production
|
||||
# ...
|
||||
```
|
||||
|
||||
### `namespaces`
|
||||
|
||||
_Optional, Default=""_
|
||||
|
||||
The `namespace` option defines the namespace in which the Nomad services will be discovered.
|
||||
The `namespaces` option defines the namespaces in which the nomad services will be discovered.
|
||||
When using the `namespaces` option, the discovered object names will be suffixed as shown below:
|
||||
|
||||
```text
|
||||
<resource-name>@nomad-<namespace>
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
One should only define either the `namespaces` option or the `namespace` option.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
nomad:
|
||||
namespace: "production"
|
||||
namespaces:
|
||||
- "ns1"
|
||||
- "ns2"
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.nomad]
|
||||
namespace = "production"
|
||||
namespaces = ["ns1", "ns2"]
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.nomad.namespace=production
|
||||
--providers.nomad.namespaces=ns1,ns2
|
||||
# ...
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue