mirror of https://github.com/status-im/consul.git
docs: Fix invalid JSON in code examples (#18932)
This commit fixes invalid JSON in various code examples.
This commit is contained in:
parent
276c60a947
commit
cc40e084bb
|
@ -947,7 +947,7 @@ $ curl \
|
|||
"Port": 8000,
|
||||
"Namespace": "default"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -52,14 +52,18 @@ once you have their coordinates. Here's a sample coordinate, as returned from th
|
|||
<CodeBlockConfig heading="Sample coordinate from Coordinate endpoint" hideClipboard>
|
||||
|
||||
```json
|
||||
...
|
||||
"Coord": {
|
||||
"Adjustment": 0.1,
|
||||
"Error": 1.5,
|
||||
"Height": 0.02,
|
||||
"Vec": [0.34,0.68,0.003,0.01,0.05,0.1,0.34,0.06]
|
||||
[
|
||||
{
|
||||
"Node": "agent-one",
|
||||
"Segment": "",
|
||||
"Coord": {
|
||||
"Adjustment": 0.1,
|
||||
"Error": 1.5,
|
||||
"Height": 0.02,
|
||||
"Vec": [0.34,0.68,0.003,0.01,0.05,0.1,0.34,0.06]
|
||||
}
|
||||
}
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
|
|
@ -62,18 +62,20 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
"Name": "default",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "<name of the peered cluster that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Name": "default",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "<name of the peered cluster that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -113,20 +115,22 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>"
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "<name of the peered cluster that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "<name of the peered cluster that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -166,20 +170,22 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>"
|
||||
"Consumers": [
|
||||
{
|
||||
"Partition": "<name of partition that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>",
|
||||
"Consumers": [
|
||||
{
|
||||
"Partition": "<name of partition that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -220,20 +226,22 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>"
|
||||
"Consumers": [
|
||||
{
|
||||
"SamenessGroup": "<name of the sameness group that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "<partition containing services to export>",
|
||||
"Name": "<partition containing services to export>",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "<name of service to export>",
|
||||
"Namespace": "<namespace in the partition containing the service to export>",
|
||||
"Consumers": [
|
||||
{
|
||||
"SamenessGroup": "<name of the sameness group that dials the exported service>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -326,7 +334,8 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Name": "default",
|
||||
"Services": [
|
||||
{
|
||||
|
@ -334,8 +343,8 @@ spec:
|
|||
"Consumers": [
|
||||
{
|
||||
"Peer": "web-shop"
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "refunds",
|
||||
|
@ -346,6 +355,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -402,18 +412,19 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "finance",
|
||||
"Name": "finance",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "payments",
|
||||
"Namespace": "billing"
|
||||
"Namespace": "billing",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "web-shop"
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "refunds",
|
||||
|
@ -425,6 +436,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -448,7 +460,7 @@ Services = [
|
|||
Consumers = [
|
||||
{
|
||||
Partition = "web-shop"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -481,18 +493,19 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "finance",
|
||||
"Name": "finance",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "payments",
|
||||
"Namespace": "billing"
|
||||
"Namespace": "billing",
|
||||
"Consumers": [
|
||||
{
|
||||
"Partition": "web-shop"
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "refunds",
|
||||
|
@ -504,6 +517,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -545,7 +559,8 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Name": "default",
|
||||
"Services": [
|
||||
{
|
||||
|
@ -557,6 +572,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -603,12 +619,13 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Name": "default",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "*",
|
||||
"Namespace": "*"
|
||||
"Namespace": "*",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "monitoring"
|
||||
|
@ -619,6 +636,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -666,13 +684,14 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "finance",
|
||||
"Name": "finance",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "*",
|
||||
"Namespace": "*"
|
||||
"Namespace": "*",
|
||||
"Consumers": [
|
||||
{
|
||||
"Peer": "monitoring"
|
||||
|
@ -683,6 +702,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -730,13 +750,14 @@ spec:
|
|||
```
|
||||
|
||||
```json
|
||||
"Kind": "exported-services",
|
||||
{
|
||||
"Kind": "exported-services",
|
||||
"Partition": "finance",
|
||||
"Name": "finance",
|
||||
"Services": [
|
||||
{
|
||||
"Name": "*",
|
||||
"Namespace": "*"
|
||||
"Namespace": "*",
|
||||
"Consumers": [
|
||||
{
|
||||
"Partition": "monitoring"
|
||||
|
@ -747,6 +768,7 @@ spec:
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -813,7 +835,6 @@ node_prefix "" {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -865,29 +886,30 @@ partition "frontend" {
|
|||
{
|
||||
"partition": {
|
||||
"frontend": {
|
||||
"namespace": {
|
||||
"namespace": {
|
||||
## The following could be any namespace
|
||||
"dev": {
|
||||
"service": {
|
||||
"service": {
|
||||
"web": {
|
||||
"policy": "write"
|
||||
"policy": "write"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
## OR
|
||||
|
||||
{
|
||||
"partition": {
|
||||
"frontend": {
|
||||
"namespace": {
|
||||
"namespace": {
|
||||
## The following could be any namespace
|
||||
"dev": {
|
||||
"service_prefix": {
|
||||
"service_prefix": {
|
||||
"": {
|
||||
"policy": "read"
|
||||
}
|
||||
|
@ -897,9 +919,9 @@ partition "frontend" {
|
|||
"policy": "read"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -953,17 +975,17 @@ partition "frontend" {
|
|||
{
|
||||
"partition": {
|
||||
"frontend": {
|
||||
"namespace": {
|
||||
"namespace": {
|
||||
## The following could be any namespace
|
||||
"dev": {
|
||||
"service": {
|
||||
"service": {
|
||||
"web": {
|
||||
"policy": "write"
|
||||
"policy": "write"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -972,10 +994,10 @@ partition "frontend" {
|
|||
{
|
||||
"partition": {
|
||||
"frontend": {
|
||||
"namespace": {
|
||||
"namespace": {
|
||||
## The following could be any namespace
|
||||
"dev": {
|
||||
"service_prefix": {
|
||||
"service_prefix": {
|
||||
"": {
|
||||
"policy": "read"
|
||||
}
|
||||
|
@ -985,9 +1007,9 @@ partition "frontend" {
|
|||
"policy": "read"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -369,9 +369,9 @@ spec:
|
|||
"MaxPendingRequests" : <number>,
|
||||
"MaxConcurrentRequests": <number>,
|
||||
"PassiveHealthCheck" : {
|
||||
"interval": <the time between checks>",
|
||||
"interval": "<the time between checks>",
|
||||
"maxFailures": <number>,
|
||||
"enforcingConsecutive5xx":<number>,
|
||||
"enforcingConsecutive5xx": <number>,
|
||||
"maxEjectionPercent": <number>,
|
||||
"baseEjectionTime": "<the base time that a host is ejected for>"
|
||||
}
|
||||
|
@ -420,11 +420,12 @@ spec:
|
|||
"MaxPendingRequests" : <number>,
|
||||
"MaxConcurrentRequests" : <number>,
|
||||
"PassiveHealthCheck" : {
|
||||
"interval": <the time between checks>",
|
||||
"interval": "<the time between checks>",
|
||||
"maxFailures": <number>,
|
||||
"enforcingConsecutive5xx":<number>,
|
||||
"maxEjectionPercent": <number>,
|
||||
"baseEjectionTime": "<the base time that a host is ejected for>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TLS" : {
|
||||
|
|
|
@ -187,7 +187,7 @@ spec:
|
|||
"Services": [
|
||||
{
|
||||
"Name": "billing",
|
||||
"CAFile": "/etc/certs/ca-chain.cert.pem"
|
||||
"CAFile": "/etc/certs/ca-chain.cert.pem",
|
||||
"SNI": "billing.service.com"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -34,8 +34,10 @@ connect {
|
|||
```
|
||||
|
||||
```json
|
||||
"connect": {
|
||||
"enabled": true
|
||||
{
|
||||
"connect": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
|
|
@ -22,7 +22,7 @@ for the built-in proxy.
|
|||
```json
|
||||
{
|
||||
"service": {
|
||||
...
|
||||
"name": "example-service",
|
||||
"connect": {
|
||||
"proxy": {
|
||||
"config": {
|
||||
|
@ -31,11 +31,11 @@ for the built-in proxy.
|
|||
"local_service_address": "127.0.0.1:1234",
|
||||
"local_connect_timeout_ms": 1000,
|
||||
"handshake_timeout_ms": 10000,
|
||||
"upstreams": [...]
|
||||
"upstreams": []
|
||||
},
|
||||
"upstreams": [
|
||||
{
|
||||
...
|
||||
"destination_name": "example-upstream",
|
||||
"config": {
|
||||
"connect_timeout_ms": 1000
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ This topic describes how to use the OpenTelemetry Access Logging Envoy extension
|
|||
|
||||
Complete the following steps to use the OpenTelemetry Access Logging extension:
|
||||
|
||||
1. Configure an `EnvoyExtensions` block in a service defaults or proxy defaults configuration entry.
|
||||
1. Configure an `EnvoyExtensions` block in a service defaults or proxy defaults configuration entry.
|
||||
1. Apply the configuration entry.
|
||||
|
||||
## Add the `EnvoyExtensions`
|
||||
|
@ -57,23 +57,25 @@ EnvoyExtensions = [
|
|||
<CodeBlockConfig filename="api-otel-collector-service-defaults.json">
|
||||
|
||||
```json
|
||||
"Kind": "service-defaults",
|
||||
"Name": "api",
|
||||
"EnvoyExtensions": [{
|
||||
"Name": "builtin/otel-access-logging",
|
||||
"Arguments": {
|
||||
"ProxyType": "connect-proxy",
|
||||
"Config": {
|
||||
"GrpcService": {
|
||||
"Target": {
|
||||
"Service": {
|
||||
"Name": "otel-collector"
|
||||
{
|
||||
"Kind": "service-defaults",
|
||||
"Name": "api",
|
||||
"EnvoyExtensions": [{
|
||||
"Name": "builtin/otel-access-logging",
|
||||
"Arguments": {
|
||||
"ProxyType": "connect-proxy",
|
||||
"Config": {
|
||||
"GrpcService": {
|
||||
"Target": {
|
||||
"Service": {
|
||||
"Name": "otel-collector"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
|
|
@ -72,25 +72,27 @@ EnvoyExtensions = [
|
|||
<CodeBlockConfig filename="property-override-extension-service-defaults.json">
|
||||
|
||||
```json
|
||||
"kind": "service-defaults",
|
||||
"name": "api",
|
||||
"protocol": "http",
|
||||
"envoyExtensions": [{
|
||||
"name": "builtin/property-override",
|
||||
"arguments": {
|
||||
"proxyType": "connect-proxy",
|
||||
"patches": [{
|
||||
"resourceFilter": {
|
||||
"resourceType": "cluster",
|
||||
"trafficDirection": "outbound",
|
||||
"services": [{ "name": "other-svc" }]
|
||||
},
|
||||
"op": "add",
|
||||
"path": "/respect_dns_ttl",
|
||||
"value": true
|
||||
}]
|
||||
}
|
||||
}]
|
||||
{
|
||||
"kind": "service-defaults",
|
||||
"name": "api",
|
||||
"protocol": "http",
|
||||
"envoyExtensions": [{
|
||||
"name": "builtin/property-override",
|
||||
"arguments": {
|
||||
"proxyType": "connect-proxy",
|
||||
"patches": [{
|
||||
"resourceFilter": {
|
||||
"resourceType": "cluster",
|
||||
"trafficDirection": "outbound",
|
||||
"services": [{ "name": "other-svc" }]
|
||||
},
|
||||
"op": "add",
|
||||
"path": "/respect_dns_ttl",
|
||||
"value": true
|
||||
}]
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
</CodeBlockConfig>
|
||||
</Tab>
|
||||
|
|
|
@ -221,6 +221,7 @@ Then, open `bootstrap.json` and update the following sections with your ACL toke
|
|||
<CodeBlockConfig filename="bootstrap.json" hideClipboard lineNumbers highlight="2,19">
|
||||
|
||||
```json
|
||||
{
|
||||
"admin": {
|
||||
"access_log_path": "/dev/null",
|
||||
"address": {
|
||||
|
|
|
@ -207,7 +207,7 @@ mesh_gateway = {
|
|||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -229,7 +229,7 @@ config = {}
|
|||
"local_bind_address": "127.0.0.1",
|
||||
"local_bind_port": 1234,
|
||||
"config": {}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -462,13 +462,15 @@ upstreams = [
|
|||
```
|
||||
|
||||
```json
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "service-1",
|
||||
"local_bind_socket_path": "/tmp/socket_service_1",
|
||||
"local_bind_socket_mode": "0700"
|
||||
}
|
||||
]
|
||||
{
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "service-1",
|
||||
"local_bind_socket_path": "/tmp/socket_service_1",
|
||||
"local_bind_socket_mode": "0700"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -499,9 +501,11 @@ services {
|
|||
```
|
||||
|
||||
```json
|
||||
"services": {
|
||||
"name": "service-2",
|
||||
"socket_path": "/tmp/socket_service_2"
|
||||
{
|
||||
"services": {
|
||||
"name": "service-2",
|
||||
"socket_path": "/tmp/socket_service_2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -519,7 +523,6 @@ services {
|
|||
proxy {
|
||||
name = "service-2"
|
||||
local_service_socket_path = "/tmp/socket_service_2"
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -527,17 +530,20 @@ services {
|
|||
```
|
||||
|
||||
```json
|
||||
"services": {
|
||||
"name": "socket_service_2",
|
||||
"connect": {
|
||||
"sidecar_service": {
|
||||
"proxy": {
|
||||
"name": "service-2",
|
||||
"local_service_socket_path": "/tmp/socket_service_2"
|
||||
...
|
||||
{
|
||||
"services": [
|
||||
{
|
||||
"name": "socket_service_2",
|
||||
"connect": {
|
||||
"sidecar_service": {
|
||||
"proxy": {
|
||||
"name": "service-2",
|
||||
"local_service_socket_path": "/tmp/socket_service_2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -682,8 +682,7 @@ An example of the output of this command:
|
|||
"TagFilter": "",
|
||||
"Version": 1,
|
||||
"LTime": 18
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ during task startup.
|
|||
"name": "consul_binary"
|
||||
}
|
||||
],
|
||||
"containerDefinitions": [...]
|
||||
"containerDefinitions": [...],
|
||||
"tags": [
|
||||
{
|
||||
"key": "consul.hashicorp.com/mesh",
|
||||
|
|
|
@ -111,7 +111,7 @@ The registrator also requires the following IAM permissions to access the parame
|
|||
"Effect": "Allow",
|
||||
"Action": ["ssm:PutParameter","ssm:DeleteParameter"],
|
||||
"Resource": "arn:aws:ssm:us-east-2:123456789012:parameter/${var.consul_extension_data_prefix}/*"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
|
@ -182,7 +182,7 @@ Response:
|
|||
"null"
|
||||
],
|
||||
"services": [
|
||||
"web",
|
||||
"web"
|
||||
],
|
||||
"events_url": "/v1/status/tasks/task_b?include=events",
|
||||
"events": [
|
||||
|
@ -217,7 +217,7 @@ Response:
|
|||
"null"
|
||||
],
|
||||
"services": [
|
||||
"web",
|
||||
"web"
|
||||
],
|
||||
"module": "../modules/test_task"
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ acl = {
|
|||
|
||||
```json
|
||||
{
|
||||
"bootstrap_expect": N,
|
||||
"bootstrap_expect": 3,
|
||||
"primary_datacenter": "PRIMARY_DATACENTER_VALUE",
|
||||
"acl": {
|
||||
"enabled": true,
|
||||
|
|
|
@ -554,7 +554,7 @@ node "admin" {
|
|||
"node_prefix": {
|
||||
"": {
|
||||
"policy": "read"
|
||||
},
|
||||
}
|
||||
},
|
||||
"node": {
|
||||
"app": {
|
||||
|
|
|
@ -35,29 +35,27 @@ Specify the value of the `SecretID` attribute with the `token` parameter when co
|
|||
|
||||
<CodeTabs>
|
||||
|
||||
<CodeBlockConfig lineNumbers highlight="6">
|
||||
<CodeBlockConfig lineNumbers highlight="5">
|
||||
|
||||
```hcl
|
||||
service = {
|
||||
id = "redis"
|
||||
name = "redis"
|
||||
...
|
||||
namespace = "foo"
|
||||
token = "233b604b-b92e-48c8-a253-5f11514e4b50"
|
||||
}
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
<CodeBlockConfig lineNumbers highlight="6">
|
||||
<CodeBlockConfig lineNumbers highlight="5">
|
||||
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"id": "redis",
|
||||
"name": "redis",
|
||||
...
|
||||
"token": "233b604b-b92e-48c8-a253-5f11514e4b50",
|
||||
"namespace": "foo"
|
||||
"namespace": "foo",
|
||||
"token": "233b604b-b92e-48c8-a253-5f11514e4b50"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -96,12 +96,14 @@ In the following example, the `env` key is set to `prod`:
|
|||
```hcl
|
||||
meta = {
|
||||
env = "prod"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
"meta" : {
|
||||
{
|
||||
"meta" : {
|
||||
"env" : "prod"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -362,25 +364,29 @@ In the following example, service instances in a `passing` state respond to DNS
|
|||
|
||||
```hcl
|
||||
service {
|
||||
## ...
|
||||
name = "redis"
|
||||
address = "192.0.2.10"
|
||||
port = 6379
|
||||
weights = {
|
||||
passing = 3
|
||||
warning = 2
|
||||
critical = 1
|
||||
}
|
||||
## ...
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
"service": {
|
||||
## ...
|
||||
"weights": {
|
||||
"passing": 3,
|
||||
"warning": 2,
|
||||
"critical": 1
|
||||
},
|
||||
## ...
|
||||
{
|
||||
"service": {
|
||||
"name": "redis",
|
||||
"address": "192.0.2.10",
|
||||
"port": 6379,
|
||||
"weights": {
|
||||
"passing": 3,
|
||||
"warning": 2,
|
||||
"critical": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -585,7 +591,7 @@ service {
|
|||
"tagged_addresses": {
|
||||
"lan": {
|
||||
"address": "192.168.0.55",
|
||||
"port": 8000,
|
||||
"port": 8000
|
||||
},
|
||||
"wan": {
|
||||
"address": "198.18.0.23",
|
||||
|
@ -632,7 +638,7 @@ service {
|
|||
},
|
||||
"connect": {
|
||||
"native": false,
|
||||
"sidecar_service": {}
|
||||
"sidecar_service": {},
|
||||
"proxy": { // Deprecated
|
||||
"command": [],
|
||||
"config": {}
|
||||
|
|
|
@ -57,8 +57,7 @@ checks = [
|
|||
name = "cpu"
|
||||
args = ["/bin/check_cpu"]
|
||||
interval = "10s"
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -82,8 +81,7 @@ checks = [
|
|||
"name": "cpu",
|
||||
"args": ["/bin/check_cpu"],
|
||||
"interval": "10s"
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
|
@ -380,8 +380,7 @@ services {
|
|||
"timeout": "60s"
|
||||
}
|
||||
]
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -397,25 +396,32 @@ Add the `enable_tag_override` option to the `service` block and set the value to
|
|||
|
||||
<CodeTabs tabs={[ "HCL","JSON" ]}>
|
||||
|
||||
<CodeBlockConfig highlight="4">
|
||||
|
||||
```hcl
|
||||
service {
|
||||
## ...
|
||||
name = "redis"
|
||||
port = 6379
|
||||
enable_tag_override = true
|
||||
## ...
|
||||
}
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
<CodeBlockConfig highlight="5">
|
||||
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
## ...
|
||||
"enable_tag_override": true,
|
||||
## ...
|
||||
"name": "redis",
|
||||
"port": 6379,
|
||||
"enable_tag_override": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
This configuration only applies to the locally registered service. Nodes that register the same service apply the `enable_tag_override` and other service configurations independently. The tags for a service registered on one node update are not affected by operations performed on services with the same name registered on other nodes.
|
||||
|
|
Loading…
Reference in New Issue