mirror of https://github.com/hashicorp/consul
Update config entry docs for namespaces
parent
a356117ae5
commit
88ae18a2b2
|
@ -52,6 +52,14 @@ The table below shows this endpoint's support for
|
||||||
non-zero, the entry is only set if the current index matches the `ModifyIndex`
|
non-zero, the entry is only set if the current index matches the `ModifyIndex`
|
||||||
of that entry.
|
of that entry.
|
||||||
|
|
||||||
|
- `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace in which the
|
||||||
|
service and checks will be registered. This value may be provided by either the
|
||||||
|
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally,
|
||||||
|
the namespace may be provided within the `Service` or `Check` fields but if
|
||||||
|
present in multiple places, they must all be the same. If not provided at all,
|
||||||
|
the namespace will be inherited from the request's ACL token or will default
|
||||||
|
to the `default` namespace. Added in Consul 1.7.0.
|
||||||
|
|
||||||
### Sample Payload
|
### Sample Payload
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,6 +117,14 @@ The table below shows this endpoint's support for
|
||||||
- `name` `(string: <required>)` - Specifies the name of the entry to read. This
|
- `name` `(string: <required>)` - Specifies the name of the entry to read. This
|
||||||
is specified as part of the URL.
|
is specified as part of the URL.
|
||||||
|
|
||||||
|
- `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace in which the
|
||||||
|
service and checks will be registered. This value may be provided by either the
|
||||||
|
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally,
|
||||||
|
the namespace may be provided within the `Service` or `Check` fields but if
|
||||||
|
present in multiple places, they must all be the same. If not provided at all,
|
||||||
|
the namespace will be inherited from the request's ACL token or will default
|
||||||
|
to the `default` namespace. Added in Consul 1.7.0.
|
||||||
|
|
||||||
### Sample Request
|
### Sample Request
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -163,6 +179,14 @@ The table below shows this endpoint's support for
|
||||||
- `kind` `(string: <required>)` - Specifies the kind of the entry to list. This
|
- `kind` `(string: <required>)` - Specifies the kind of the entry to list. This
|
||||||
is specified as part of the URL.
|
is specified as part of the URL.
|
||||||
|
|
||||||
|
- `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace in which the
|
||||||
|
service and checks will be registered. This value may be provided by either the
|
||||||
|
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally,
|
||||||
|
the namespace may be provided within the `Service` or `Check` fields but if
|
||||||
|
present in multiple places, they must all be the same. If not provided at all,
|
||||||
|
the namespace will be inherited from the request's ACL token or will default
|
||||||
|
to the `default` namespace. Added in Consul 1.7.0.
|
||||||
|
|
||||||
### Sample Request
|
### Sample Request
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -229,6 +253,14 @@ The table below shows this endpoint's support for
|
||||||
- `name` `(string: <required>)` - Specifies the name of the entry to delete. This
|
- `name` `(string: <required>)` - Specifies the name of the entry to delete. This
|
||||||
is specified as part of the URL.
|
is specified as part of the URL.
|
||||||
|
|
||||||
|
- `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace in which the
|
||||||
|
service and checks will be registered. This value may be provided by either the
|
||||||
|
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally,
|
||||||
|
the namespace may be provided within the `Service` or `Check` fields but if
|
||||||
|
present in multiple places, they must all be the same. If not provided at all,
|
||||||
|
the namespace will be inherited from the request's ACL token or will default
|
||||||
|
to the `default` namespace. Added in Consul 1.7.0.
|
||||||
|
|
||||||
### Sample Request
|
### Sample Request
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
|
@ -125,6 +125,24 @@ $ consul config delete -kind service-defaults -name web
|
||||||
|
|
||||||
This command will not output anything when the deletion is successful.
|
This command will not output anything when the deletion is successful.
|
||||||
|
|
||||||
|
#### Configuration Entry Management with Namespaces
|
||||||
|
|
||||||
|
**Enterprise Only** - Configuration entry operations support passing a namespace in
|
||||||
|
order to isolate the entry to affect only operations within that namespace. This was
|
||||||
|
added in Consul 1.7.0.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ consul config write service-defaults.hcl -namespace foo
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ consul config list -kind service-defaults -namespace foo
|
||||||
|
web
|
||||||
|
api
|
||||||
|
```
|
||||||
|
|
||||||
### Bootstrapping From A Configuration File
|
### Bootstrapping From A Configuration File
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ Usage: `consul config delete [options]`
|
||||||
|
|
||||||
<%= partial "docs/commands/http_api_options_client" %>
|
<%= partial "docs/commands/http_api_options_client" %>
|
||||||
|
|
||||||
|
#### Enterprise Options
|
||||||
|
|
||||||
|
<%= partial "docs/commands/http_api_namespace_options" %>
|
||||||
|
|
||||||
#### Config Delete Options
|
#### Config Delete Options
|
||||||
|
|
||||||
* `-kind` - Specifies the kind of the config entry to read.
|
* `-kind` - Specifies the kind of the config entry to read.
|
||||||
|
|
|
@ -20,6 +20,10 @@ Usage: `consul config list [options]`
|
||||||
|
|
||||||
<%= partial "docs/commands/http_api_options_client" %>
|
<%= partial "docs/commands/http_api_options_client" %>
|
||||||
|
|
||||||
|
#### Enterprise Options
|
||||||
|
|
||||||
|
<%= partial "docs/commands/http_api_namespace_options" %>
|
||||||
|
|
||||||
#### Config List Options
|
#### Config List Options
|
||||||
|
|
||||||
* `-kind` - Specifies the kind of the config entry to read.
|
* `-kind` - Specifies the kind of the config entry to read.
|
||||||
|
@ -30,5 +34,3 @@ Usage: `consul config list [options]`
|
||||||
billing
|
billing
|
||||||
db
|
db
|
||||||
web
|
web
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,10 @@ Usage: `consul config read [options]`
|
||||||
|
|
||||||
<%= partial "docs/commands/http_api_options_client" %>
|
<%= partial "docs/commands/http_api_options_client" %>
|
||||||
|
|
||||||
|
#### Enterprise Options
|
||||||
|
|
||||||
|
<%= partial "docs/commands/http_api_namespace_options" %>
|
||||||
|
|
||||||
#### Config Read Options
|
#### Config Read Options
|
||||||
|
|
||||||
* `-kind` - Specifies the kind of the config entry to read.
|
* `-kind` - Specifies the kind of the config entry to read.
|
||||||
|
@ -37,5 +41,3 @@ Usage: `consul config read [options]`
|
||||||
"CreateIndex": 13,
|
"CreateIndex": 13,
|
||||||
"ModifyIndex": 13
|
"ModifyIndex": 13
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ Usage: `consul config write [options] FILE`
|
||||||
|
|
||||||
<%= partial "docs/commands/http_api_options_client" %>
|
<%= partial "docs/commands/http_api_options_client" %>
|
||||||
|
|
||||||
|
#### Enterprise Options
|
||||||
|
|
||||||
|
<%= partial "docs/commands/http_api_namespace_options" %>
|
||||||
|
|
||||||
#### Config Write Options
|
#### Config Write Options
|
||||||
|
|
||||||
* `-cas` - Specifies to use a Check-And-Set operation. If the index is
|
* `-cas` - Specifies to use a Check-And-Set operation. If the index is
|
||||||
|
|
Loading…
Reference in New Issue