From dc72292824fce30d4058b39f45ebfd256808c37d Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Wed, 31 Jul 2024 15:51:53 -0600 Subject: [PATCH 1/4] Update Contour Docker image to v1.30.0. Signed-off-by: Steve Kriss --- examples/contour/02-job-certgen.yaml | 7 +++---- examples/contour/03-contour.yaml | 4 ++-- examples/contour/03-envoy.yaml | 8 ++++---- examples/deployment/03-envoy-deployment.yaml | 8 ++++---- .../03-gateway-provisioner.yaml | 4 ++-- examples/render/contour-deployment.yaml | 19 +++++++++---------- .../render/contour-gateway-provisioner.yaml | 4 ++-- examples/render/contour-gateway.yaml | 19 +++++++++---------- examples/render/contour.yaml | 19 +++++++++---------- 9 files changed, 44 insertions(+), 48 deletions(-) diff --git a/examples/contour/02-job-certgen.yaml b/examples/contour/02-job-certgen.yaml index 35ba3d2fc7d..eda87b52614 100644 --- a/examples/contour/02-job-certgen.yaml +++ b/examples/contour/02-job-certgen.yaml @@ -36,10 +36,9 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-main + name: contour-certgen-v1-30-0 namespace: projectcontour spec: - ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -47,8 +46,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent command: - contour - certgen diff --git a/examples/contour/03-contour.yaml b/examples/contour/03-contour.yaml index 2db6109d01d..4226695ae43 100644 --- a/examples/contour/03-contour.yaml +++ b/examples/contour/03-contour.yaml @@ -42,8 +42,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour ports: - containerPort: 8001 diff --git a/examples/contour/03-envoy.yaml b/examples/contour/03-envoy.yaml index b9c71f39ba8..98fd9e67ba4 100644 --- a/examples/contour/03-envoy.yaml +++ b/examples/contour/03-envoy.yaml @@ -25,8 +25,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent lifecycle: preStop: exec: @@ -107,8 +107,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/deployment/03-envoy-deployment.yaml b/examples/deployment/03-envoy-deployment.yaml index 265e70e844e..d3df4d6038f 100644 --- a/examples/deployment/03-envoy-deployment.yaml +++ b/examples/deployment/03-envoy-deployment.yaml @@ -37,8 +37,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent lifecycle: preStop: exec: @@ -119,8 +119,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/gateway-provisioner/03-gateway-provisioner.yaml b/examples/gateway-provisioner/03-gateway-provisioner.yaml index ba5a3cfc2e4..bd699fc14d4 100644 --- a/examples/gateway-provisioner/03-gateway-provisioner.yaml +++ b/examples/gateway-provisioner/03-gateway-provisioner.yaml @@ -22,8 +22,8 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour-gateway-provisioner resources: requests: diff --git a/examples/render/contour-deployment.yaml b/examples/render/contour-deployment.yaml index 1b89dcd4a1c..bc5952a63a2 100644 --- a/examples/render/contour-deployment.yaml +++ b/examples/render/contour-deployment.yaml @@ -8958,10 +8958,9 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-main + name: contour-certgen-v1-30-0 namespace: projectcontour spec: - ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8969,8 +8968,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent command: - contour - certgen @@ -9228,8 +9227,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour ports: - containerPort: 8001 @@ -9324,8 +9323,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent lifecycle: preStop: exec: @@ -9406,8 +9405,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/render/contour-gateway-provisioner.yaml b/examples/render/contour-gateway-provisioner.yaml index 31b631cca9a..c66a900af2e 100644 --- a/examples/render/contour-gateway-provisioner.yaml +++ b/examples/render/contour-gateway-provisioner.yaml @@ -25522,8 +25522,8 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour-gateway-provisioner resources: requests: diff --git a/examples/render/contour-gateway.yaml b/examples/render/contour-gateway.yaml index f37bdc1a9b5..89497cf65ea 100644 --- a/examples/render/contour-gateway.yaml +++ b/examples/render/contour-gateway.yaml @@ -8774,10 +8774,9 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-main + name: contour-certgen-v1-30-0 namespace: projectcontour spec: - ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8785,8 +8784,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent command: - contour - certgen @@ -9044,8 +9043,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour ports: - containerPort: 8001 @@ -9128,8 +9127,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent lifecycle: preStop: exec: @@ -9210,8 +9209,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/render/contour.yaml b/examples/render/contour.yaml index 5361950a894..ad0fcf7fa18 100644 --- a/examples/render/contour.yaml +++ b/examples/render/contour.yaml @@ -8958,10 +8958,9 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-main + name: contour-certgen-v1-30-0 namespace: projectcontour spec: - ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8969,8 +8968,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent command: - contour - certgen @@ -9228,8 +9227,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: contour ports: - containerPort: 8001 @@ -9312,8 +9311,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent lifecycle: preStop: exec: @@ -9394,8 +9393,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:main - imagePullPolicy: Always + image: ghcr.io/projectcontour/contour:v1.30.0 + imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: - name: envoy-config From 1f51d71c1ebc31118b920d843189f7b1ad7b4693 Mon Sep 17 00:00:00 2001 From: Tero Saarni Date: Mon, 4 Nov 2024 13:58:22 +0200 Subject: [PATCH 2/4] Update Contour Docker image to v1.30.1. Signed-off-by: Tero Saarni --- examples/contour/02-job-certgen.yaml | 4 ++-- examples/contour/03-contour.yaml | 2 +- examples/contour/03-envoy.yaml | 4 ++-- examples/deployment/03-envoy-deployment.yaml | 4 ++-- .../gateway-provisioner/03-gateway-provisioner.yaml | 2 +- examples/render/contour-deployment.yaml | 10 +++++----- examples/render/contour-gateway-provisioner.yaml | 2 +- examples/render/contour-gateway.yaml | 10 +++++----- examples/render/contour.yaml | 10 +++++----- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/contour/02-job-certgen.yaml b/examples/contour/02-job-certgen.yaml index eda87b52614..37cb147c3ae 100644 --- a/examples/contour/02-job-certgen.yaml +++ b/examples/contour/02-job-certgen.yaml @@ -36,7 +36,7 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-0 + name: contour-certgen-v1-30-1 namespace: projectcontour spec: template: @@ -46,7 +46,7 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent command: - contour diff --git a/examples/contour/03-contour.yaml b/examples/contour/03-contour.yaml index 4226695ae43..fbca8a9f28c 100644 --- a/examples/contour/03-contour.yaml +++ b/examples/contour/03-contour.yaml @@ -42,7 +42,7 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour ports: diff --git a/examples/contour/03-envoy.yaml b/examples/contour/03-envoy.yaml index 98fd9e67ba4..09521042711 100644 --- a/examples/contour/03-envoy.yaml +++ b/examples/contour/03-envoy.yaml @@ -25,7 +25,7 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -107,7 +107,7 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: diff --git a/examples/deployment/03-envoy-deployment.yaml b/examples/deployment/03-envoy-deployment.yaml index d3df4d6038f..3740d8efff8 100644 --- a/examples/deployment/03-envoy-deployment.yaml +++ b/examples/deployment/03-envoy-deployment.yaml @@ -37,7 +37,7 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -119,7 +119,7 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: diff --git a/examples/gateway-provisioner/03-gateway-provisioner.yaml b/examples/gateway-provisioner/03-gateway-provisioner.yaml index bd699fc14d4..7d2d01f8aef 100644 --- a/examples/gateway-provisioner/03-gateway-provisioner.yaml +++ b/examples/gateway-provisioner/03-gateway-provisioner.yaml @@ -22,7 +22,7 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour-gateway-provisioner resources: diff --git a/examples/render/contour-deployment.yaml b/examples/render/contour-deployment.yaml index bc5952a63a2..74aaf4aa4f4 100644 --- a/examples/render/contour-deployment.yaml +++ b/examples/render/contour-deployment.yaml @@ -8958,7 +8958,7 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-0 + name: contour-certgen-v1-30-1 namespace: projectcontour spec: template: @@ -8968,7 +8968,7 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent command: - contour @@ -9227,7 +9227,7 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour ports: @@ -9323,7 +9323,7 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -9405,7 +9405,7 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: diff --git a/examples/render/contour-gateway-provisioner.yaml b/examples/render/contour-gateway-provisioner.yaml index c66a900af2e..7b0f2049143 100644 --- a/examples/render/contour-gateway-provisioner.yaml +++ b/examples/render/contour-gateway-provisioner.yaml @@ -25522,7 +25522,7 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour-gateway-provisioner resources: diff --git a/examples/render/contour-gateway.yaml b/examples/render/contour-gateway.yaml index 89497cf65ea..bc478f99970 100644 --- a/examples/render/contour-gateway.yaml +++ b/examples/render/contour-gateway.yaml @@ -8774,7 +8774,7 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-0 + name: contour-certgen-v1-30-1 namespace: projectcontour spec: template: @@ -8784,7 +8784,7 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent command: - contour @@ -9043,7 +9043,7 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour ports: @@ -9127,7 +9127,7 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -9209,7 +9209,7 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: diff --git a/examples/render/contour.yaml b/examples/render/contour.yaml index ad0fcf7fa18..7000d141781 100644 --- a/examples/render/contour.yaml +++ b/examples/render/contour.yaml @@ -8958,7 +8958,7 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-0 + name: contour-certgen-v1-30-1 namespace: projectcontour spec: template: @@ -8968,7 +8968,7 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent command: - contour @@ -9227,7 +9227,7 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: contour ports: @@ -9311,7 +9311,7 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -9393,7 +9393,7 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.0 + image: ghcr.io/projectcontour/contour:v1.30.1 imagePullPolicy: IfNotPresent name: envoy-initconfig volumeMounts: From 7cea2fd15898c7112e9e5ac65cf17884fcda465f Mon Sep 17 00:00:00 2001 From: David Sale Date: Thu, 12 Dec 2024 10:20:21 +0000 Subject: [PATCH 3/4] Setup contour to use ADS with DELTA_GRPC Signed-off-by: David Sale --- examples/contour/02-job-certgen.yaml | 7 +- examples/contour/03-contour.yaml | 4 +- examples/contour/03-envoy.yaml | 8 +- examples/deployment/03-envoy-deployment.yaml | 8 +- .../03-gateway-provisioner.yaml | 4 +- examples/render/contour-deployment.yaml | 19 +- .../render/contour-gateway-provisioner.yaml | 4 +- examples/render/contour-gateway.yaml | 19 +- examples/render/contour.yaml | 19 +- internal/envoy/v3/auth.go | 4 +- internal/envoy/v3/bootstrap.go | 13 +- internal/envoy/v3/bootstrap_test.go | 520 +++++------------- internal/envoy/v3/cluster.go | 21 +- internal/envoy/v3/cluster_test.go | 46 +- internal/envoy/v3/listener.go | 2 +- internal/envoy/v3/listener_test.go | 272 +-------- internal/envoy/v3/stats.go | 4 +- internal/envoy/v3/stats_test.go | 6 +- internal/featuretests/v3/cluster_test.go | 22 +- internal/featuretests/v3/envoy.go | 2 +- .../v3/loadbalancerpolicy_test.go | 12 +- internal/xdscache/v3/cluster_test.go | 44 +- 22 files changed, 282 insertions(+), 778 deletions(-) diff --git a/examples/contour/02-job-certgen.yaml b/examples/contour/02-job-certgen.yaml index 37cb147c3ae..35ba3d2fc7d 100644 --- a/examples/contour/02-job-certgen.yaml +++ b/examples/contour/02-job-certgen.yaml @@ -36,9 +36,10 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-1 + name: contour-certgen-main namespace: projectcontour spec: + ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -46,8 +47,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always command: - contour - certgen diff --git a/examples/contour/03-contour.yaml b/examples/contour/03-contour.yaml index fbca8a9f28c..2db6109d01d 100644 --- a/examples/contour/03-contour.yaml +++ b/examples/contour/03-contour.yaml @@ -42,8 +42,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour ports: - containerPort: 8001 diff --git a/examples/contour/03-envoy.yaml b/examples/contour/03-envoy.yaml index 09521042711..b9c71f39ba8 100644 --- a/examples/contour/03-envoy.yaml +++ b/examples/contour/03-envoy.yaml @@ -25,8 +25,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always lifecycle: preStop: exec: @@ -107,8 +107,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/deployment/03-envoy-deployment.yaml b/examples/deployment/03-envoy-deployment.yaml index 3740d8efff8..265e70e844e 100644 --- a/examples/deployment/03-envoy-deployment.yaml +++ b/examples/deployment/03-envoy-deployment.yaml @@ -37,8 +37,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always lifecycle: preStop: exec: @@ -119,8 +119,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/gateway-provisioner/03-gateway-provisioner.yaml b/examples/gateway-provisioner/03-gateway-provisioner.yaml index 7d2d01f8aef..ba5a3cfc2e4 100644 --- a/examples/gateway-provisioner/03-gateway-provisioner.yaml +++ b/examples/gateway-provisioner/03-gateway-provisioner.yaml @@ -22,8 +22,8 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour-gateway-provisioner resources: requests: diff --git a/examples/render/contour-deployment.yaml b/examples/render/contour-deployment.yaml index 74aaf4aa4f4..1b89dcd4a1c 100644 --- a/examples/render/contour-deployment.yaml +++ b/examples/render/contour-deployment.yaml @@ -8958,9 +8958,10 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-1 + name: contour-certgen-main namespace: projectcontour spec: + ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8968,8 +8969,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always command: - contour - certgen @@ -9227,8 +9228,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour ports: - containerPort: 8001 @@ -9323,8 +9324,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always lifecycle: preStop: exec: @@ -9405,8 +9406,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/render/contour-gateway-provisioner.yaml b/examples/render/contour-gateway-provisioner.yaml index 7b0f2049143..31b631cca9a 100644 --- a/examples/render/contour-gateway-provisioner.yaml +++ b/examples/render/contour-gateway-provisioner.yaml @@ -25522,8 +25522,8 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour-gateway-provisioner resources: requests: diff --git a/examples/render/contour-gateway.yaml b/examples/render/contour-gateway.yaml index bc478f99970..f37bdc1a9b5 100644 --- a/examples/render/contour-gateway.yaml +++ b/examples/render/contour-gateway.yaml @@ -8774,9 +8774,10 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-1 + name: contour-certgen-main namespace: projectcontour spec: + ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8784,8 +8785,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always command: - contour - certgen @@ -9043,8 +9044,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour ports: - containerPort: 8001 @@ -9127,8 +9128,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always lifecycle: preStop: exec: @@ -9209,8 +9210,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/examples/render/contour.yaml b/examples/render/contour.yaml index 7000d141781..5361950a894 100644 --- a/examples/render/contour.yaml +++ b/examples/render/contour.yaml @@ -8958,9 +8958,10 @@ rules: apiVersion: batch/v1 kind: Job metadata: - name: contour-certgen-v1-30-1 + name: contour-certgen-main namespace: projectcontour spec: + ttlSecondsAfterFinished: 0 template: metadata: labels: @@ -8968,8 +8969,8 @@ spec: spec: containers: - name: contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always command: - contour - certgen @@ -9227,8 +9228,8 @@ spec: - --contour-key-file=/certs/tls.key - --config-path=/config/contour.yaml command: ["contour"] - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: contour ports: - containerPort: 8001 @@ -9311,8 +9312,8 @@ spec: args: - envoy - shutdown-manager - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always lifecycle: preStop: exec: @@ -9393,8 +9394,8 @@ spec: - --envoy-key-file=/certs/tls.key command: - contour - image: ghcr.io/projectcontour/contour:v1.30.1 - imagePullPolicy: IfNotPresent + image: ghcr.io/projectcontour/contour:main + imagePullPolicy: Always name: envoy-initconfig volumeMounts: - name: envoy-config diff --git a/internal/envoy/v3/auth.go b/internal/envoy/v3/auth.go index 0989c2409c8..a50ecc92dfd 100644 --- a/internal/envoy/v3/auth.go +++ b/internal/envoy/v3/auth.go @@ -31,7 +31,7 @@ func UpstreamTLSContext(peerValidationContext *dag.PeerValidationContext, sni st if clientSecret != nil { clientSecretConfigs = []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: envoy.Secretname(clientSecret), - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }} } @@ -125,7 +125,7 @@ func DownstreamTLSContext(serverSecret *dag.Secret, tlsMinProtoVersion, tlsMaxPr }, TlsCertificateSdsSecretConfigs: []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: envoy.Secretname(serverSecret), - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }}, AlpnProtocols: alpnProtos, }, diff --git a/internal/envoy/v3/bootstrap.go b/internal/envoy/v3/bootstrap.go index a70d3268c8f..9d92a838a9b 100644 --- a/internal/envoy/v3/bootstrap.go +++ b/internal/envoy/v3/bootstrap.go @@ -169,7 +169,7 @@ func bootstrapConfig(c *envoy.BootstrapConfig) *envoy_config_bootstrap_v3.Bootst LayerSpecifier: &envoy_config_bootstrap_v3.RuntimeLayer_RtdsLayer_{ RtdsLayer: &envoy_config_bootstrap_v3.RuntimeLayer_RtdsLayer{ Name: DynamicRuntimeLayerName, - RtdsConfig: ConfigSource("contour"), + RtdsConfig: ConfigSource(), }, }, }, @@ -187,8 +187,15 @@ func bootstrapConfig(c *envoy.BootstrapConfig) *envoy_config_bootstrap_v3.Bootst }, }, DynamicResources: &envoy_config_bootstrap_v3.Bootstrap_DynamicResources{ - LdsConfig: ConfigSource("contour"), - CdsConfig: ConfigSource("contour"), + AdsConfig: &envoy_config_core_v3.ApiConfigSource{ + ApiType: envoy_config_core_v3.ApiConfigSource_DELTA_GRPC, + TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, + GrpcServices: []*envoy_config_core_v3.GrpcService{ + GrpcService("contour", "", timeout.DefaultSetting()), + }, + }, + LdsConfig: ConfigSource(), + CdsConfig: ConfigSource(), }, StaticResources: &envoy_config_bootstrap_v3.Bootstrap_StaticResources{ Clusters: []*envoy_config_cluster_v3.Cluster{{ diff --git a/internal/envoy/v3/bootstrap_test.go b/internal/envoy/v3/bootstrap_test.go index cc1c9a9fd87..9a47c2fa67e 100644 --- a/internal/envoy/v3/bootstrap_test.go +++ b/internal/envoy/v3/bootstrap_test.go @@ -130,35 +130,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -191,19 +177,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -311,35 +285,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -372,19 +332,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -492,35 +440,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -553,19 +487,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -674,35 +596,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -735,19 +643,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -856,35 +752,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -917,19 +799,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -1038,35 +908,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -1099,19 +955,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -1222,35 +1066,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -1283,19 +1113,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -1440,35 +1258,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -1501,19 +1305,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -1656,35 +1448,21 @@ func TestBootstrap(t *testing.T) { ] }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "default_regex_engine": { @@ -1717,19 +1495,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, @@ -1890,35 +1656,21 @@ func TestBootstrap(t *testing.T) { } }, "dynamic_resources": { + "ads_config": { + "api_type": "DELTA_GRPC", + "transport_api_version": "V3", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "contour", + "authority": "contour" + } + }] + }, "lds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} }, "cds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } }, "layered_runtime": { @@ -1928,19 +1680,7 @@ func TestBootstrap(t *testing.T) { "rtds_layer": { "name": "dynamic", "rtds_config": { - "api_config_source": { - "api_type": "GRPC", - "transport_api_version": "V3", - "grpc_services": [ - { - "envoy_grpc": { - "cluster_name": "contour", - "authority": "contour" - } - } - ] - }, - "resource_api_version": "V3" + "ads": {} } } }, diff --git a/internal/envoy/v3/cluster.go b/internal/envoy/v3/cluster.go index 24346c48421..8135dc4036b 100644 --- a/internal/envoy/v3/cluster.go +++ b/internal/envoy/v3/cluster.go @@ -61,7 +61,7 @@ func Cluster(c *dag.Cluster) *envoy_config_cluster_v3.Cluster { case 0: // external name not set, cluster will be discovered via EDS cluster.ClusterDiscoveryType = ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS) - cluster.EdsClusterConfig = edsconfig("contour", service) + cluster.EdsClusterConfig = edsconfig(service) default: // external name set, use hard coded DNS name // external name set to LOGICAL_DNS when user selects the ALL loookup family @@ -156,7 +156,7 @@ func ExtensionCluster(ext *dag.ExtensionCluster) *envoy_config_cluster_v3.Cluste // Cluster will be discovered via EDS. cluster.ClusterDiscoveryType = ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS) cluster.EdsClusterConfig = &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: ext.Upstream.ClusterName, } @@ -231,9 +231,9 @@ func DNSNameCluster(c *dag.DNSNameCluster) *envoy_config_cluster_v3.Cluster { return cluster } -func edsconfig(cluster string, service *dag.Service) *envoy_config_cluster_v3.Cluster_EdsClusterConfig { +func edsconfig(service *dag.Service) *envoy_config_cluster_v3.Cluster_EdsClusterConfig { return &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource(cluster), + EdsConfig: ConfigSource(), ServiceName: xds.ClusterLoadAssignmentName( types.NamespacedName{Name: service.Weighted.ServiceName, Namespace: service.Weighted.ServiceNamespace}, service.Weighted.ServicePort.Name, @@ -280,18 +280,9 @@ func ClusterCommonLBConfig() *envoy_config_cluster_v3.Cluster_CommonLbConfig { } // ConfigSource returns a *envoy_config_core_v3.ConfigSource for cluster. -func ConfigSource(cluster string) *envoy_config_core_v3.ConfigSource { +func ConfigSource() *envoy_config_core_v3.ConfigSource { return &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{ - GrpcService(cluster, "", timeout.DefaultSetting()), - }, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, } } diff --git a/internal/envoy/v3/cluster_test.go b/internal/envoy/v3/cluster_test.go index cc9f64bcec5..9eb31c97835 100644 --- a/internal/envoy/v3/cluster_test.go +++ b/internal/envoy/v3/cluster_test.go @@ -150,7 +150,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, }, @@ -165,7 +165,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TypedExtensionProtocolOptions: map[string]*anypb.Any{ @@ -190,7 +190,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TransportSocket: UpstreamTLSTransportSocket( @@ -305,7 +305,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TransportSocket: UpstreamTLSTransportSocket( @@ -345,7 +345,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TransportSocket: UpstreamTLSTransportSocket( @@ -382,7 +382,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TransportSocket: UpstreamTLSTransportSocket( @@ -423,7 +423,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -457,7 +457,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -491,7 +491,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -525,7 +525,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -559,7 +559,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -583,7 +583,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_RANDOM, @@ -599,7 +599,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -615,7 +615,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, }, @@ -635,7 +635,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, IgnoreHealthOnHostRemoval: true, @@ -661,7 +661,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TransportSocket: UpstreamTLSTransportSocket( @@ -679,7 +679,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, ConnectTimeout: durationpb.New(10 * time.Second), @@ -695,7 +695,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TypedExtensionProtocolOptions: map[string]*anypb.Any{ @@ -728,7 +728,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, LbConfig: &envoy_config_cluster_v3.Cluster_RoundRobinLbConfig_{ @@ -762,7 +762,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_LEAST_REQUEST, @@ -792,7 +792,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, PerConnectionBufferLimitBytes: wrapperspb.UInt32(32768), @@ -808,7 +808,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TypedExtensionProtocolOptions: map[string]*anypb.Any{ @@ -840,7 +840,7 @@ func TestCluster(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: ConfigSource("contour"), + EdsConfig: ConfigSource(), ServiceName: "default/kuard/http", }, TypedExtensionProtocolOptions: map[string]*anypb.Any{ diff --git a/internal/envoy/v3/listener.go b/internal/envoy/v3/listener.go index 213a71af9bf..5675da25023 100644 --- a/internal/envoy/v3/listener.go +++ b/internal/envoy/v3/listener.go @@ -490,7 +490,7 @@ func (b *httpConnectionManagerBuilder) Get() *envoy_config_listener_v3.Filter { RouteSpecifier: &envoy_filter_network_http_connection_manager_v3.HttpConnectionManager_Rds{ Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: b.routeConfigName, - ConfigSource: ConfigSource("contour"), + ConfigSource: ConfigSource(), }, }, Tracing: b.tracingConfig, diff --git a/internal/envoy/v3/listener_test.go b/internal/envoy/v3/listener_test.go index e2aa3a64fee..fe64be3d70f 100644 --- a/internal/envoy/v3/listener_test.go +++ b/internal/envoy/v3/listener_test.go @@ -272,21 +272,7 @@ func TestDownstreamTLSContext(t *testing.T) { tlsCertificateSdsSecretConfigs := []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: envoy.Secretname(serverSecret), SdsConfig: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }} @@ -678,21 +664,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -725,21 +697,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -773,21 +731,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -822,21 +766,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -870,21 +800,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -919,21 +835,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -966,21 +868,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1014,21 +902,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1063,21 +937,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1112,21 +972,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1159,21 +1005,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1220,21 +1052,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1277,21 +1095,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1324,21 +1128,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1372,21 +1162,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, @@ -1421,21 +1197,7 @@ func TestHTTPConnectionManager(t *testing.T) { Rds: &envoy_filter_network_http_connection_manager_v3.Rds{ RouteConfigName: "default/kuard", ConfigSource: &envoy_config_core_v3.ConfigSource{ - ResourceApiVersion: envoy_config_core_v3.ApiVersion_V3, - ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_ApiConfigSource{ - ApiConfigSource: &envoy_config_core_v3.ApiConfigSource{ - ApiType: envoy_config_core_v3.ApiConfigSource_GRPC, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - GrpcServices: []*envoy_config_core_v3.GrpcService{{ - TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{ - EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{ - ClusterName: "contour", - Authority: "contour", - }, - }, - }}, - }, - }, + ConfigSourceSpecifier: &envoy_config_core_v3.ConfigSource_Ads{}, }, }, }, diff --git a/internal/envoy/v3/stats.go b/internal/envoy/v3/stats.go index a444218db88..1c5848a4eb3 100644 --- a/internal/envoy/v3/stats.go +++ b/internal/envoy/v3/stats.go @@ -194,7 +194,7 @@ func downstreamTLSContext(clientValidation bool) *envoy_transport_socket_tls_v3. }, TlsCertificateSdsSecretConfigs: []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: metricsServerCertSDSName, - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }}, }, } @@ -203,7 +203,7 @@ func downstreamTLSContext(clientValidation bool) *envoy_transport_socket_tls_v3. context.CommonTlsContext.ValidationContextType = &envoy_transport_socket_tls_v3.CommonTlsContext_ValidationContextSdsSecretConfig{ ValidationContextSdsSecretConfig: &envoy_transport_socket_tls_v3.SdsSecretConfig{ Name: metricsCaBundleSDSName, - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }, } context.RequireClientCertificate = wrapperspb.Bool(true) diff --git a/internal/envoy/v3/stats_test.go b/internal/envoy/v3/stats_test.go index cdabc908bf5..f3c32839fdd 100644 --- a/internal/envoy/v3/stats_test.go +++ b/internal/envoy/v3/stats_test.go @@ -216,7 +216,7 @@ func TestStatsListeners(t *testing.T) { }, TlsCertificateSdsSecretConfigs: []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: "metrics-tls-certificate", - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }}, }, }, @@ -307,12 +307,12 @@ func TestStatsListeners(t *testing.T) { }, TlsCertificateSdsSecretConfigs: []*envoy_transport_socket_tls_v3.SdsSecretConfig{{ Name: "metrics-tls-certificate", - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }}, ValidationContextType: &envoy_transport_socket_tls_v3.CommonTlsContext_ValidationContextSdsSecretConfig{ ValidationContextSdsSecretConfig: &envoy_transport_socket_tls_v3.SdsSecretConfig{ Name: "metrics-ca-certificate", - SdsConfig: ConfigSource("contour"), + SdsConfig: ConfigSource(), }, }, }, diff --git a/internal/featuretests/v3/cluster_test.go b/internal/featuretests/v3/cluster_test.go index 2680585ba4b..b5c2e6d0769 100644 --- a/internal/featuretests/v3/cluster_test.go +++ b/internal/featuretests/v3/cluster_test.go @@ -452,7 +452,7 @@ func TestClusterCircuitbreakerAnnotationsIngress(t *testing.T) { AltStatName: "default_kuard_8080", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -490,7 +490,7 @@ func TestClusterCircuitbreakerAnnotationsIngress(t *testing.T) { AltStatName: "default_kuard_8080", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -527,7 +527,7 @@ func TestClusterCircuitbreakerAnnotationsIngress(t *testing.T) { AltStatName: "default_kuard_8080", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -596,7 +596,7 @@ func TestClusterCircuitbreakerAnnotationsHTTPProxy(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -633,7 +633,7 @@ func TestClusterCircuitbreakerAnnotationsHTTPProxy(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -670,7 +670,7 @@ func TestClusterCircuitbreakerAnnotationsHTTPProxy(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -782,7 +782,7 @@ func TestClusterCircuitbreakerAnnotationsGateway(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -819,7 +819,7 @@ func TestClusterCircuitbreakerAnnotationsGateway(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -856,7 +856,7 @@ func TestClusterCircuitbreakerAnnotationsGateway(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -975,7 +975,7 @@ func TestClusterLoadBalancerStrategyPerRoute(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, LbPolicy: envoy_config_cluster_v3.Cluster_RANDOM, @@ -985,7 +985,7 @@ func TestClusterLoadBalancerStrategyPerRoute(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, LbPolicy: envoy_config_cluster_v3.Cluster_LEAST_REQUEST, diff --git a/internal/featuretests/v3/envoy.go b/internal/featuretests/v3/envoy.go index 7b4d1ca8501..c9ac9285132 100644 --- a/internal/featuretests/v3/envoy.go +++ b/internal/featuretests/v3/envoy.go @@ -178,7 +178,7 @@ func cluster(name, servicename, statName string) *envoy_config_cluster_v3.Cluste ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: statName, EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: servicename, }, }) diff --git a/internal/featuretests/v3/loadbalancerpolicy_test.go b/internal/featuretests/v3/loadbalancerpolicy_test.go index d51b7653e7f..732acd84592 100644 --- a/internal/featuretests/v3/loadbalancerpolicy_test.go +++ b/internal/featuretests/v3/loadbalancerpolicy_test.go @@ -61,7 +61,7 @@ func TestLoadBalancerPolicySessionAffinity(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_80", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -113,7 +113,7 @@ func TestLoadBalancerPolicySessionAffinity(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_80", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -123,7 +123,7 @@ func TestLoadBalancerPolicySessionAffinity(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_8080", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -198,7 +198,7 @@ func TestLoadBalancerPolicyRequestHashHeader(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_80", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -268,7 +268,7 @@ func TestLoadBalancerPolicyRequestHashSourceIP(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_80", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -341,7 +341,7 @@ func TestLoadBalancerPolicyRequestHashQueryParameter(t *testing.T) { ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), AltStatName: s1.Namespace + "_" + s1.Name + "_80", EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: s1.Namespace + "/" + s1.Name, }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, diff --git a/internal/xdscache/v3/cluster_test.go b/internal/xdscache/v3/cluster_test.go index b370948c6e8..8a6ebf5097a 100644 --- a/internal/xdscache/v3/cluster_test.go +++ b/internal/xdscache/v3/cluster_test.go @@ -50,7 +50,7 @@ func TestClusterCacheContents(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -60,7 +60,7 @@ func TestClusterCacheContents(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -91,7 +91,7 @@ func TestClusterCacheQuery(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -102,7 +102,7 @@ func TestClusterCacheQuery(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -115,7 +115,7 @@ func TestClusterCacheQuery(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -126,7 +126,7 @@ func TestClusterCacheQuery(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -139,7 +139,7 @@ func TestClusterCacheQuery(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -192,7 +192,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard", }, }), @@ -228,7 +228,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard/https", }, }), @@ -268,7 +268,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard/http", }, TypedExtensionProtocolOptions: map[string]*anypb.Any{ @@ -310,7 +310,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "beurocratic-company-test-domain-1_tiny-cog-department-test-instance_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "beurocratic-company-test-domain-1/tiny-cog-department-test-instance/svc-0", }, }), @@ -358,7 +358,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, }, @@ -367,7 +367,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_8080", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/alt", }, }, @@ -411,7 +411,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, HealthChecks: []*envoy_config_core_v3.HealthCheck{{ @@ -473,7 +473,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, HealthChecks: []*envoy_config_core_v3.HealthCheck{{ @@ -530,7 +530,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, }, @@ -574,7 +574,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_LEAST_REQUEST, @@ -619,7 +619,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_RANDOM, @@ -671,7 +671,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, LbPolicy: envoy_config_cluster_v3.Cluster_RING_HASH, @@ -718,7 +718,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_backend_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/backend/http", }, }, @@ -763,7 +763,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_kuard_80", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard/http", }, CircuitBreakers: &envoy_config_cluster_v3.CircuitBreakers{ @@ -817,7 +817,7 @@ func TestClusterVisit(t *testing.T) { AltStatName: "default_kuard_443", ClusterDiscoveryType: envoy_v3.ClusterDiscoveryType(envoy_config_cluster_v3.Cluster_EDS), EdsClusterConfig: &envoy_config_cluster_v3.Cluster_EdsClusterConfig{ - EdsConfig: envoy_v3.ConfigSource("contour"), + EdsConfig: envoy_v3.ConfigSource(), ServiceName: "default/kuard/https", }, }), From e6d2d2620c33f13df2a52274641e5a83cef28419 Mon Sep 17 00:00:00 2001 From: David Sale Date: Mon, 16 Dec 2024 16:23:34 +0000 Subject: [PATCH 4/4] Add release note Signed-off-by: David Sale --- changelogs/unreleased/6806-saley89-minor.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelogs/unreleased/6806-saley89-minor.md diff --git a/changelogs/unreleased/6806-saley89-minor.md b/changelogs/unreleased/6806-saley89-minor.md new file mode 100644 index 00000000000..c3b118133c8 --- /dev/null +++ b/changelogs/unreleased/6806-saley89-minor.md @@ -0,0 +1,6 @@ +## Replace GRPC state of world updates with ADS Delta + +The mechanism used for xDS updates between Contour and Envoy has been changed from standard `GRPC` (aka "state of the world" updates) to +[Aggregated Discovery Service](https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/xds_api#aggregated-discovery-service) (ADS) `Delta GRPC` updates. This change is a part of the ongoing effort to improve the performance and scalability of Contour. +With this mechanism in place Contour will now send only the changes to Envoy, instead of the entire state of the world on every update. Additionally, using ADS allows all the communication to be delivered on a single, bidirectional gRPC stream. +Together these changes drastically reduce the cpu and memory footprint of Contour and Envoy, and improve the overall performance of the system allowing for greater numbers of HttpProxies in a single cluster.