From 773f516099f5386c0ae31c6e5b4efc629594b663 Mon Sep 17 00:00:00 2001 From: Derek Menteer Date: Tue, 11 Apr 2023 10:30:20 -0500 Subject: [PATCH 1/5] Update docs for service-defaults overrides. --- .../docs/connect/config-entries/service-defaults.mdx | 6 +----- website/content/docs/upgrading/upgrade-specific.mdx | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/website/content/docs/connect/config-entries/service-defaults.mdx b/website/content/docs/connect/config-entries/service-defaults.mdx index 826115b03422..3058f8e6488f 100644 --- a/website/content/docs/connect/config-entries/service-defaults.mdx +++ b/website/content/docs/connect/config-entries/service-defaults.mdx @@ -1589,11 +1589,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 ( \`*\`).

- 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', diff --git a/website/content/docs/upgrading/upgrade-specific.mdx b/website/content/docs/upgrading/upgrade-specific.mdx index 8a73a721bfc4..e4a77c089d9c 100644 --- a/website/content/docs/upgrading/upgrade-specific.mdx +++ b/website/content/docs/upgrading/upgrade-specific.mdx @@ -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. +The `service-defaults` upstream [`overrides`](/consul/docs/connect/config-entries/service-defaults#overrides) +parameter does not apply to peer upstreams unless the [`peer`](/consul/docs/connect/config-entries/service-defaults#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 From 4fd659e42523e434910db49456c80b4973d91022 Mon Sep 17 00:00:00 2001 From: Derek Menteer Date: Tue, 11 Apr 2023 10:48:42 -0500 Subject: [PATCH 2/5] Add missing service-defaults info. --- .../docs/connect/config-entries/service-defaults.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/content/docs/connect/config-entries/service-defaults.mdx b/website/content/docs/connect/config-entries/service-defaults.mdx index 3058f8e6488f..c877b581a4d3 100644 --- a/website/content/docs/connect/config-entries/service-defaults.mdx +++ b/website/content/docs/connect/config-entries/service-defaults.mdx @@ -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 @@ -532,6 +533,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. From 9be10fed6ea8a05cfa0faf3cfb0ccdefe3dd4016 Mon Sep 17 00:00:00 2001 From: Derek Menteer <105233703+hashi-derek@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:02:40 -0500 Subject: [PATCH 3/5] Update website/content/docs/upgrading/upgrade-specific.mdx Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/content/docs/upgrading/upgrade-specific.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/upgrading/upgrade-specific.mdx b/website/content/docs/upgrading/upgrade-specific.mdx index e4a77c089d9c..c8e6c583c165 100644 --- a/website/content/docs/upgrading/upgrade-specific.mdx +++ b/website/content/docs/upgrading/upgrade-specific.mdx @@ -18,8 +18,8 @@ upgrade flow. #### Remove deprecated service-defaults peer upstream override behavior -The `service-defaults` upstream [`overrides`](/consul/docs/connect/config-entries/service-defaults#overrides) -parameter does not apply to peer upstreams unless the [`peer`](/consul/docs/connect/config-entries/service-defaults#peer) field is explicitly provided. +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 From ab9a6bff0ecf4e694025a002bbe4e433034572f8 Mon Sep 17 00:00:00 2001 From: Derek Menteer Date: Tue, 11 Apr 2023 11:08:27 -0500 Subject: [PATCH 4/5] Address more PR feedback. --- .../content/docs/connect/config-entries/service-defaults.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/content/docs/connect/config-entries/service-defaults.mdx b/website/content/docs/connect/config-entries/service-defaults.mdx index c877b581a4d3..dc70cc7c3daf 100644 --- a/website/content/docs/connect/config-entries/service-defaults.mdx +++ b/website/content/docs/connect/config-entries/service-defaults.mdx @@ -171,6 +171,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 = { @@ -255,6 +256,7 @@ spec: overrides: - name: namespace: + peer: protocol: connectTimeoutMs: 5000 meshGateway: @@ -325,6 +327,7 @@ spec: { "name": "", "namespace": "", + "peer": "", "protocol": "", "connectTimeoutMs": 5000, "meshGateway": { From 1c65ad1a176525a618fcfa25a3b1d9841c4f3828 Mon Sep 17 00:00:00 2001 From: Derek Menteer Date: Tue, 11 Apr 2023 11:24:47 -0500 Subject: [PATCH 5/5] Add missing k8s yaml. --- .../docs/connect/config-entries/service-defaults.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/content/docs/connect/config-entries/service-defaults.mdx b/website/content/docs/connect/config-entries/service-defaults.mdx index dc70cc7c3daf..3205f4659235 100644 --- a/website/content/docs/connect/config-entries/service-defaults.mdx +++ b/website/content/docs/connect/config-entries/service-defaults.mdx @@ -95,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 @@ -919,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.