Update namespace docs for config entries (#7420)

pull/7413/head
Freddy 2020-03-09 14:51:21 -06:00 committed by GitHub
parent 382d33bb7e
commit 602aa742d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 61 deletions

View File

@ -52,11 +52,9 @@ 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 - `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace the config
service and checks will be registered. This value may be provided by either the entry will apply to. This value may be provided by either the `ns` URL query
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally, parameter or in the `X-Consul-Namespace` header. If not provided at all,
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 the namespace will be inherited from the request's ACL token or will default
to the `default` namespace. Added in Consul 1.7.0. to the `default` namespace. Added in Consul 1.7.0.
@ -117,13 +115,10 @@ 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 - `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace to query.
service and checks will be registered. This value may be provided by either the This value may be provided by either the `ns` URL query parameter or in the
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally, `X-Consul-Namespace` header. If not provided at all, the namespace will be inherited from
the namespace may be provided within the `Service` or `Check` fields but if the request's ACL token or will default to the `default` namespace. Added in Consul 1.7.0.
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
@ -179,13 +174,10 @@ 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 - `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace to query.
service and checks will be registered. This value may be provided by either the This value may be provided by either the `ns` URL query parameter or in the
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally, `X-Consul-Namespace` header. If not provided at all, the namespace will be inherited from
the namespace may be provided within the `Service` or `Check` fields but if the request's ACL token or will default to the `default` namespace. Added in Consul 1.7.0.
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
@ -253,13 +245,10 @@ 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 - `ns` `(string: "")` - **(Enterprise Only)** Specifies the namespace to delete from.
service and checks will be registered. This value may be provided by either the This value may be provided by either the `ns` URL query parameter or in the
`ns` URL query parameter or in the `X-Consul-Namespace` header. Additionally, `X-Consul-Namespace` header. If not provided at all, the namespace will be inherited
the namespace may be provided within the `Service` or `Check` fields but if from the request's ACL token or will default to the `default` namespace. Added in Consul 1.7.0.
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

View File

@ -14,11 +14,12 @@ one global entry is supported.
## Sample Config Entries ## Sample Config Entries
Set the default protocol for all sidecar proxies: Set the default protocol for all sidecar proxies in the default namespace:
```hcl ```hcl
kind = "proxy-defaults" kind = "proxy-defaults"
name = "global" name = "global"
namespace = "default"
config { config {
protocol = "http" protocol = "http"
} }
@ -41,6 +42,8 @@ config {
- `Name` - Must be set to `global` - `Name` - Must be set to `global`
- `Namespace` `(string: "default")` - **Enterprise Only** Specifies the namespace the config entry will apply to.
- `Config` `(map[string]arbitrary)` - An arbitrary map of configuration values used by Connect proxies. - `Config` `(map[string]arbitrary)` - An arbitrary map of configuration values used by Connect proxies.
The available configurations depend on the Connect proxy you use. Any values The available configurations depend on the Connect proxy you use. Any values
that your proxy allows can be configured globally here. To that your proxy allows can be configured globally here. To

View File

@ -13,11 +13,12 @@ service, such as its protocol.
## Sample Config Entries ## Sample Config Entries
Set the default protocol for a service to HTTP: Set the default protocol for a service in the default namespace to HTTP:
```hcl ```hcl
Kind = "service-defaults" Kind = "service-defaults"
Name = "web" Name = "web"
Namespace = "default"
Protocol = "http" Protocol = "http"
``` ```
@ -27,6 +28,8 @@ Protocol = "http"
- `Name` `(string: <required>)` - Set to the name of the service being configured. - `Name` `(string: <required>)` - Set to the name of the service being configured.
- `Namespace` `(string: "default")` - **Enterprise Only** Specifies the namespace the config entry will apply to.
- `Protocol` `(string: "tcp")` - Sets the protocol of the service. This is used - `Protocol` `(string: "tcp")` - Sets the protocol of the service. This is used
by Connect proxies for things like observability features and to unlock usage by Connect proxies for things like observability features and to unlock usage
of the [`service-splitter`](/docs/agent/config-entries/service-splitter.html) and of the [`service-splitter`](/docs/agent/config-entries/service-splitter.html) and