mirror of https://github.com/hashicorp/consul
Formatting spaces between keys in Config entries (#8116)
* Formatting spaces between keys in Config entries * Service Router spacing * Missing Camel Case proxy-defaults * Remove extra spaces service-splitter * Remove extra spsaces service-resolver * More spaces a la hclfmt * Nice! * Oh joy! * More spaces on proxy-defaults * Update website/pages/docs/agent/config-entries/proxy-defaults.mdx Co-authored-by: Chris Piraino <cpiraino@hashicorp.com>pull/8126/head
parent
2c31673c03
commit
fb1f043cdc
|
@ -50,7 +50,7 @@ Name = "ingress-service"
|
|||
|
||||
Listeners = [
|
||||
{
|
||||
Port = 3456
|
||||
Port = 3456
|
||||
Protocol = "tcp"
|
||||
Services = [
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ TLS {
|
|||
|
||||
Listeners = [
|
||||
{
|
||||
Port = 8080
|
||||
Port = 8080
|
||||
Protocol = "http"
|
||||
Services = [
|
||||
{
|
||||
|
@ -84,15 +84,15 @@ Listeners = [
|
|||
]
|
||||
},
|
||||
{
|
||||
Port = 4567
|
||||
Port = 4567
|
||||
Protocol = "http"
|
||||
Services = [
|
||||
{
|
||||
Name = "api"
|
||||
Name = "api"
|
||||
Hosts = ["foo.example.com"]
|
||||
},
|
||||
{
|
||||
Name = "web"
|
||||
Name = "web"
|
||||
Hosts = ["website.example.com"]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -19,10 +19,10 @@ one global entry is supported.
|
|||
Set the default protocol for all sidecar proxies in the default namespace:
|
||||
|
||||
```hcl
|
||||
kind = "proxy-defaults"
|
||||
name = "global"
|
||||
namespace = "default"
|
||||
config {
|
||||
Kind = "proxy-defaults"
|
||||
Name = "global"
|
||||
Namespace = "default"
|
||||
Config {
|
||||
protocol = "http"
|
||||
}
|
||||
```
|
||||
|
@ -30,11 +30,11 @@ config {
|
|||
Set proxy-specific defaults :
|
||||
|
||||
```hcl
|
||||
kind = "proxy-defaults"
|
||||
name = "global"
|
||||
config {
|
||||
Kind = "proxy-defaults"
|
||||
Name = "global"
|
||||
Config {
|
||||
local_connect_timeout_ms = 1000
|
||||
handshake_timeout_ms = 10000
|
||||
handshake_timeout_ms = 10000
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ service, such as its protocol.
|
|||
Set the default protocol for a service in the default namespace to HTTP:
|
||||
|
||||
```hcl
|
||||
Kind = "service-defaults"
|
||||
Name = "web"
|
||||
Kind = "service-defaults"
|
||||
Name = "web"
|
||||
Namespace = "default"
|
||||
Protocol = "http"
|
||||
Protocol = "http"
|
||||
```
|
||||
|
||||
## Available Fields
|
||||
|
|
|
@ -28,8 +28,8 @@ and discovery terminates.
|
|||
Create service subsets based on a version metadata and override the defaults:
|
||||
|
||||
```hcl
|
||||
Kind = "service-resolver"
|
||||
Name = "web"
|
||||
Kind = "service-resolver"
|
||||
Name = "web"
|
||||
DefaultSubset = "v1"
|
||||
Subsets = {
|
||||
"v1" = {
|
||||
|
@ -55,8 +55,8 @@ Redirect {
|
|||
Enable failover for all subsets:
|
||||
|
||||
```hcl
|
||||
Kind = "service-resolver"
|
||||
Name = "web"
|
||||
Kind = "service-resolver"
|
||||
Name = "web"
|
||||
ConnectTimeout = "15s"
|
||||
Failover = {
|
||||
"*" = {
|
||||
|
|
|
@ -77,7 +77,7 @@ Routes = [
|
|||
}
|
||||
}
|
||||
Destination {
|
||||
Service = "web"
|
||||
Service = "web"
|
||||
ServiceSubset = "canary"
|
||||
}
|
||||
},
|
||||
|
@ -93,7 +93,7 @@ Routes = [
|
|||
}
|
||||
}
|
||||
Destination {
|
||||
Service = "web"
|
||||
Service = "web"
|
||||
ServiceSubset = "canary"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -48,11 +48,11 @@ Kind = "service-splitter"
|
|||
Name = "web"
|
||||
Splits = [
|
||||
{
|
||||
Weight = 90
|
||||
Weight = 90
|
||||
ServiceSubset = "v1"
|
||||
},
|
||||
{
|
||||
Weight = 10
|
||||
Weight = 10
|
||||
ServiceSubset = "v2"
|
||||
},
|
||||
]
|
||||
|
@ -65,7 +65,7 @@ Kind = "service-splitter"
|
|||
Name = "web"
|
||||
Splits = [
|
||||
{
|
||||
Weight = 50
|
||||
Weight = 50
|
||||
# will default to service with same name as config entry ("web")
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue