Merge pull request #7243 from hashicorp/config-entry-namespace-docs

Update config entry docs for namespaces
This commit is contained in:
Kyle Havlovitz 2020-02-07 12:03:41 -08:00 committed by GitHub
commit 0db15f222a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 4 deletions

View File

@ -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`
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
@ -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
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
```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
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
```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
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
```sh

View File

@ -125,6 +125,24 @@ $ consul config delete -kind service-defaults -name web
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

View File

@ -20,6 +20,10 @@ Usage: `consul config delete [options]`
<%= partial "docs/commands/http_api_options_client" %>
#### Enterprise Options
<%= partial "docs/commands/http_api_namespace_options" %>
#### Config Delete Options
* `-kind` - Specifies the kind of the config entry to read.

View File

@ -20,6 +20,10 @@ Usage: `consul config list [options]`
<%= partial "docs/commands/http_api_options_client" %>
#### Enterprise Options
<%= partial "docs/commands/http_api_namespace_options" %>
#### Config List Options
* `-kind` - Specifies the kind of the config entry to read.
@ -30,5 +34,3 @@ Usage: `consul config list [options]`
billing
db
web

View File

@ -21,6 +21,10 @@ Usage: `consul config read [options]`
<%= partial "docs/commands/http_api_options_client" %>
#### Enterprise Options
<%= partial "docs/commands/http_api_namespace_options" %>
#### Config Read Options
* `-kind` - Specifies the kind of the config entry to read.
@ -37,5 +41,3 @@ Usage: `consul config read [options]`
"CreateIndex": 13,
"ModifyIndex": 13
}

View File

@ -20,6 +20,10 @@ Usage: `consul config write [options] FILE`
<%= partial "docs/commands/http_api_options_client" %>
#### Enterprise Options
<%= partial "docs/commands/http_api_namespace_options" %>
#### Config Write Options
* `-cas` - Specifies to use a Check-And-Set operation. If the index is