Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for service-defaults overrides. #16960

Merged
merged 5 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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',
Expand Down
8 changes: 3 additions & 5 deletions website/content/docs/upgrading/upgrade-specific.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down