Update docs for service-defaults overrides. (#16960)

Update docs for service-defaults overrides.

Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
This commit is contained in:
Derek Menteer 2023-04-11 11:40:55 -05:00 committed by GitHub
parent 380d74ca95
commit 2ef812f68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 10 deletions

View File

@ -27,6 +27,7 @@ The following outline shows how to format the service splitter configuration ent
- [`Overrides`](#upstreamconfig-overrides): map | no default
- [`Name`](#upstreamconfig-overrides-name): string | no default
- [`Namespace`](#upstreamconfig-overrides-namespace): string | no default
- [`Peer`](#upstreamconfig-overrides-peer): string | no default
- [`Protocol`](#upstreamconfig-overrides-protocol): string | no default
- [`ConnectTimeoutMs`](#upstreamconfig-overrides-connecttimeoutms): int | default: `5000`
- [`MeshGateway`](#upstreamconfig-overrides-meshgateway): map | no default
@ -94,6 +95,7 @@ The following outline shows how to format the service splitter configuration ent
- [`overrides`](#upstreamconfig-overrides): list | no default
- [`name`](#upstreamconfig-overrides-name): string | no default
- [`namespace`](#upstreamconfig-overrides-namespace): string | no default
- [`peer`](#upstreamconfig-overrides-peer): string | no default
- [`protocol`](#upstreamconfig-overrides-protocol): string | no default
- [`connectTimeoutMs`](#upstreamconfig-overrides-connecttimeoutms): int | default: `5000`
- [`meshGateway`](#upstreamconfig-overrides-meshgateway): map | no default
@ -170,6 +172,7 @@ UpstreamConfig = {
Overrides = {
Name = "name-of-upstreams-to-override"
Namespace = "namespace-containing-upstreams-to-override"
Peer = "peer-name-of-upstream-service"
Protocol = "http"
ConnectTimeoutMs = 100
MeshGateway = {
@ -254,6 +257,7 @@ spec:
overrides:
- name: <name of upstream>
namespace: <namespace containing upstream - Consul Enterprise>
peer: <peer name of the upstream service>
protocol: <protocol for the upstream listener>
connectTimeoutMs: 5000
meshGateway:
@ -324,6 +328,7 @@ spec:
{
"name": "<name of upstream>",
"namespace": "<namespace containing upstream - Consul Enterprise>",
"peer": "<peer name of the upstream service>",
"protocol": "<protocol for the upstream listener>",
"connectTimeoutMs": 5000,
"meshGateway": {
@ -532,6 +537,15 @@ Specifies the namespace containing the upstream service that the configuration a
- Default: none
- Data type: string
### `UpstreamConfig.Overrides[].Peer`
Specifies the peer name of the upstream service that the configuration applies to. The `*` wildcard is not supported.
#### Values
- Default: none
- Data type: string
### `UpstreamConfig.Overrides[].Protocol`
Specifies the protocol to use for requests to the upstream listener.
@ -906,6 +920,15 @@ Specifies the namespace containing the upstream service that the configuration a
- Default: none
- Data type: string
### `spec.upstreamConfig.overrides[].peer`
Specifies the peer name of the upstream service that the configuration applies to. The `*` wildcard is not supported.
#### Values
- Default: none
- Data type: string
### `spec.upstreamConfig.overrides[].protocol`
Specifies the protocol to use for requests to the upstream listener. We recommend configuring the protocol in the main [`protocol`](#protocol) field of the configuration entry so that you can leverage [L7 features](/consul/docs/connect/l7-traffic). Setting the protocol in an upstream configuration limits L7 management functionality.
@ -1589,11 +1612,7 @@ represents a location outside the Consul cluster. Services can dial destinations
name: 'Peer',
type: 'string: ""',
description:
`The name of the peer containing the upstream. Do not use a wildcard specifier ( \`*\`).<br><br>
If the \`peer\` field is not set in any \`Overrides\` configuration, then Consul applies overrides to peered services with the same [\`name\`](/consul/docs/connect/config-entries/service-defaults#name).
This maintains backward compatibility with Consul 1.14.0.
If the \`peer\` field is specified in any override, then backward compatibility with Consul 1.14.0 is disabled.
As a result, each peered service must have a separate override configuration if desired.` ,
`The peer name of the upstream. Do not use a wildcard specifier ( \`*\`).`,
},
{
name: 'Protocol',

View File

@ -18,11 +18,9 @@ upgrade flow.
#### Remove deprecated service-defaults peer upstream override behavior
In Consul 1.16.x, `service-defaults` upstream [`overrides`](/consul/docs/connect/config-entries/service-defaults#overrides)
will not apply to peer upstreams, unless the [`peer`](/consul/docs/connect/config-entries/service-defaults#peer) field is explicitly provided.
Consul 1.15.x introduced a backward-compatibility behavior to allow for a smoother transition during the upgrade. This behavior will be removed in Consul 1.16.x.
Visit the [upgrade instructions for 1.15.x](#service-defaults-overrides-for-upstream-peered-services) for more info.
When configuring a service defaults configuration entry, the [`UpstreamConfig.Overrides` configuration](/consul/docs/connect/config-entries/service-defaults#upstreamconfig-overrides)
does not apply to peer upstreams unless the [`Peer`](/consul/docs/connect/config-entries/service-defaults#upstreamconfig-overrides-peer) field is explicitly provided.
This change removes the backward-compatibility behavior introduced in Consul 1.15.x. Refer to the [upgrade instructions for 1.15.x](#service-defaults-overrides-for-upstream-peered-services) for more information.
## Consul 1.15.x