Backport of docs: Remove YAML service registration examples into release/1.16.x (#18906)
backport of commit 06c2aaaf74115cdaf21af058aebe5b4c5776e037 Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
This commit is contained in:
parent
6a7f0b774c
commit
5b8aaffd50
|
@ -100,6 +100,17 @@ MeshGateway:
|
|||
- Mode: local
|
||||
Name: global
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "proxy-defaults",
|
||||
"Name": "global",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways Per Service
|
||||
|
@ -123,6 +134,16 @@ MeshGateway:
|
|||
Name: web
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "service-defaults",
|
||||
"Name": "web",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways for a Service Instance
|
||||
|
@ -161,7 +182,7 @@ service {
|
|||
sidecar_service {
|
||||
proxy {
|
||||
mesh_gateway {
|
||||
mode = "remote"
|
||||
mode = "remote"
|
||||
}
|
||||
upstreams = [
|
||||
{
|
||||
|
@ -176,19 +197,27 @@ service {
|
|||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
mesh_gateway:
|
||||
- mode: remote
|
||||
upstreams:
|
||||
- datacenter: secondary
|
||||
destination_name: api
|
||||
local_bind_port: 100
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"mesh_gateway": {
|
||||
"mode": "remote"
|
||||
},
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "api",
|
||||
"datacenter": "secondary",
|
||||
"local_bind_port": 10000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -235,25 +264,39 @@ service {
|
|||
}
|
||||
}
|
||||
```
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
upstreams:
|
||||
- destination_name: api
|
||||
local_bind_port: 10000
|
||||
mesh_gateway:
|
||||
- mode: remote
|
||||
- destination_name: db
|
||||
local_bind_port: 10001
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
- destination_name: logging
|
||||
local_bind_port: 10002
|
||||
mesh_gateway:
|
||||
- mode: none
|
||||
```
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "api",
|
||||
"local_bind_port": 10000,
|
||||
"mesh_gateway": {
|
||||
"mode": "remote"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "db",
|
||||
"local_bind_port": 10001,
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "logging",
|
||||
"local_bind_port": 10002,
|
||||
"mesh_gateway": {
|
||||
"mode": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
|
|
@ -95,6 +95,16 @@ MeshGateway:
|
|||
Name: global
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "proxy-defaults",
|
||||
"Name": "global",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways Per Service
|
||||
|
@ -117,6 +127,17 @@ MeshGateway:
|
|||
- Mode: local
|
||||
Name: web
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "service-defaults",
|
||||
"Name": "web",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways for a Service Instance
|
||||
|
@ -124,7 +145,7 @@ Name: web
|
|||
The following [proxy service configuration](/consul/docs/connect/proxies/deploy-service-mesh-proxies)
|
||||
enables gateways for `web` service instances in the `finance` partition.
|
||||
|
||||
<CodeTabs heading="Example: Enabling gateways for a service instance.">
|
||||
<CodeTabs heading="Example: Enabling gateways for a service instance">
|
||||
|
||||
```hcl
|
||||
service {
|
||||
|
@ -149,21 +170,29 @@ service {
|
|||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
upstreams:
|
||||
- destination_name: billing
|
||||
destination_namespace: default
|
||||
destination_partition: finance
|
||||
destination_type: service
|
||||
local_bind_port: 9090
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
},
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "billing",
|
||||
"destination_namespace": "default",
|
||||
"destination_partition": "finance",
|
||||
"destination_type": "service",
|
||||
"local_bind_port": 9090
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
||||
|
@ -171,7 +200,7 @@ service:
|
|||
|
||||
The following service definition will enable gateways in `local` mode for three different partitions. Note that each service exists in the same namespace, but are separated by admin partition.
|
||||
|
||||
<CodeTabs heading="Example: Enabling gateways for a proxy upstream.">
|
||||
<CodeTabs heading="Example: Enabling gateways for a proxy upstream">
|
||||
|
||||
```hcl
|
||||
service {
|
||||
|
@ -213,31 +242,45 @@ service {
|
|||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
upstreams:
|
||||
- destination_name: api
|
||||
destination_namespace: dev
|
||||
destination_partition: api
|
||||
local_bind_port: 10000
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
- destination_name: db
|
||||
destination_namespace: dev
|
||||
destination_partition: db
|
||||
local_bind_port: 10001
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
- destination_name: logging
|
||||
destination_namespace: dev
|
||||
destination_partition: logging
|
||||
local_bind_port: 10002
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "api",
|
||||
"destination_namespace": "dev",
|
||||
"destination_partition": "api",
|
||||
"local_bind_port": 10000,
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "db",
|
||||
"destination_namespace": "dev",
|
||||
"destination_partition": "db",
|
||||
"local_bind_port": 10001,
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "logging",
|
||||
"destination_namespace": "dev",
|
||||
"destination_partition": "logging",
|
||||
"local_bind_port": 10002,
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
|
|
@ -110,6 +110,16 @@ MeshGateway:
|
|||
- Mode: local
|
||||
Name: global
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "proxy-defaults",
|
||||
"Name": "global",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways Per Service
|
||||
|
@ -133,6 +143,15 @@ MeshGateway:
|
|||
Name: web
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"Kind": "service-defaults",
|
||||
"Name": "web",
|
||||
"MeshGateway": {
|
||||
"Mode": "local"
|
||||
}
|
||||
}
|
||||
|
||||
</CodeTabs>
|
||||
|
||||
### Enabling Gateways for a Service Instance
|
||||
|
@ -186,19 +205,27 @@ service {
|
|||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
mesh_gateway:
|
||||
- mode: remote
|
||||
upstreams:
|
||||
- datacenter: secondary
|
||||
destination_name: api
|
||||
local_bind_port: 100
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"mesh_gateway": {
|
||||
"mode": "remote"
|
||||
},
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "api",
|
||||
"datacenter": "secondary",
|
||||
"local_bind_port": 10000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</CodeTabs>
|
||||
|
@ -242,25 +269,39 @@ service {
|
|||
}
|
||||
}
|
||||
```
|
||||
```yaml
|
||||
service:
|
||||
- kind: connect-proxy
|
||||
name: web-sidecar-proxy
|
||||
port: 8181
|
||||
proxy:
|
||||
- destination_service_name: web
|
||||
upstreams:
|
||||
- destination_name: api
|
||||
local_bind_port: 10000
|
||||
mesh_gateway:
|
||||
- mode: remote
|
||||
- destination_name: db
|
||||
local_bind_port: 10001
|
||||
mesh_gateway:
|
||||
- mode: local
|
||||
- destination_name: logging
|
||||
local_bind_port: 10002
|
||||
mesh_gateway:
|
||||
- mode: none
|
||||
```
|
||||
</CodeTabs>
|
||||
```json
|
||||
{
|
||||
"service": {
|
||||
"kind": "connect-proxy",
|
||||
"name": "web-sidecar-proxy",
|
||||
"port": 8181,
|
||||
"proxy": {
|
||||
"destination_service_name": "web",
|
||||
"upstreams": [
|
||||
{
|
||||
"destination_name": "api",
|
||||
"local_bind_port": 10000,
|
||||
"mesh_gateway": {
|
||||
"mode": "remote"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "db",
|
||||
"local_bind_port": 10001,
|
||||
"mesh_gateway": {
|
||||
"mode": "local"
|
||||
}
|
||||
},
|
||||
{
|
||||
"destination_name": "logging",
|
||||
"local_bind_port": 10002,
|
||||
"mesh_gateway": {
|
||||
"mode": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeTabs>
|
||||
|
|
|
@ -110,26 +110,6 @@ service {
|
|||
}
|
||||
```
|
||||
</CodeBlockConfig>
|
||||
<CodeBlockConfig heading="service.yaml">
|
||||
|
||||
```yaml
|
||||
service:
|
||||
- id: redis
|
||||
meta:
|
||||
- custom_meta_key: custom_meta_value
|
||||
name: redis
|
||||
port: 80
|
||||
tagged_addresses:
|
||||
- lan:
|
||||
- address: 192.168.0.55
|
||||
port: 8000
|
||||
wan:
|
||||
- address: 198.18.0.23
|
||||
port: 80
|
||||
tags:
|
||||
- primary
|
||||
```
|
||||
</CodeBlockConfig>
|
||||
</CodeTabs>
|
||||
|
||||
### Health checks
|
||||
|
@ -427,10 +407,12 @@ service {
|
|||
```
|
||||
|
||||
```json
|
||||
"service": {
|
||||
## ...
|
||||
"enable_tag_override": true,
|
||||
## ...
|
||||
{
|
||||
"service": {
|
||||
## ...
|
||||
"enable_tag_override": true,
|
||||
## ...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue