diff --git a/.changelog/20010.txt b/.changelog/20010.txt new file mode 100644 index 000000000000..c9e957cc4374 --- /dev/null +++ b/.changelog/20010.txt @@ -0,0 +1,3 @@ +```release-note:improvement +xds: Replace usage of deprecated Envoy field `envoy.config.cluster.v3.Cluster.http_protocol_options` +``` \ No newline at end of file diff --git a/command/connect/envoy/bootstrap_config.go b/command/connect/envoy/bootstrap_config.go index 2591daf24610..8c3c2124469d 100644 --- a/command/connect/envoy/bootstrap_config.go +++ b/command/connect/envoy/bootstrap_config.go @@ -653,7 +653,14 @@ func (c *BootstrapConfig) generateListenerConfig(args *BootstrapTplArgs, bindAdd "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "` + clusterName + `", "endpoints": [ diff --git a/command/connect/envoy/bootstrap_config_test.go b/command/connect/envoy/bootstrap_config_test.go index 9b7c0412e9ed..4c2c3e8a00d5 100644 --- a/command/connect/envoy/bootstrap_config_test.go +++ b/command/connect/envoy/bootstrap_config_test.go @@ -21,7 +21,14 @@ const ( "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ @@ -47,7 +54,14 @@ const ( "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ @@ -73,7 +87,14 @@ const ( "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "prometheus_backend", "endpoints": [ diff --git a/command/connect/envoy/testdata/envoy-readiness-probe.golden b/command/connect/envoy/testdata/envoy-readiness-probe.golden index faa5e958f537..4fba6db59055 100644 --- a/command/connect/envoy/testdata/envoy-readiness-probe.golden +++ b/command/connect/envoy/testdata/envoy-readiness-probe.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway-address-specified.golden b/command/connect/envoy/testdata/ingress-gateway-address-specified.golden index ba4a341f9d73..7ba3e2287cea 100644 --- a/command/connect/envoy/testdata/ingress-gateway-address-specified.golden +++ b/command/connect/envoy/testdata/ingress-gateway-address-specified.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden b/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden index f81ac13cdfdb..c866099ee0e7 100644 --- a/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden +++ b/command/connect/envoy/testdata/ingress-gateway-no-auto-register.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway-nodemeta.golden b/command/connect/envoy/testdata/ingress-gateway-nodemeta.golden index 7983a070ecac..39eae930d0b3 100644 --- a/command/connect/envoy/testdata/ingress-gateway-nodemeta.golden +++ b/command/connect/envoy/testdata/ingress-gateway-nodemeta.golden @@ -75,7 +75,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden b/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden index 75b8b345ce00..44a3c25c69ba 100644 --- a/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden +++ b/command/connect/envoy/testdata/ingress-gateway-register-with-service-and-proxy-id.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden b/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden index bf106f342659..a9e6f7e5fa14 100644 --- a/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden +++ b/command/connect/envoy/testdata/ingress-gateway-register-with-service-without-proxy-id.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/ingress-gateway.golden b/command/connect/envoy/testdata/ingress-gateway.golden index e270bec33f8f..e5c5e875939d 100644 --- a/command/connect/envoy/testdata/ingress-gateway.golden +++ b/command/connect/envoy/testdata/ingress-gateway.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "self_admin", "endpoints": [ diff --git a/command/connect/envoy/testdata/prometheus-metrics-tls-ca-file.golden b/command/connect/envoy/testdata/prometheus-metrics-tls-ca-file.golden index 3f8fc4ce959d..5754779b978c 100644 --- a/command/connect/envoy/testdata/prometheus-metrics-tls-ca-file.golden +++ b/command/connect/envoy/testdata/prometheus-metrics-tls-ca-file.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "prometheus_backend", "endpoints": [ diff --git a/command/connect/envoy/testdata/prometheus-metrics-tls-ca-path.golden b/command/connect/envoy/testdata/prometheus-metrics-tls-ca-path.golden index 6ea679d72394..c41b00fb2d29 100644 --- a/command/connect/envoy/testdata/prometheus-metrics-tls-ca-path.golden +++ b/command/connect/envoy/testdata/prometheus-metrics-tls-ca-path.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "prometheus_backend", "endpoints": [ diff --git a/command/connect/envoy/testdata/prometheus-metrics.golden b/command/connect/envoy/testdata/prometheus-metrics.golden index e582cd16d7ef..1b31b48f8a22 100644 --- a/command/connect/envoy/testdata/prometheus-metrics.golden +++ b/command/connect/envoy/testdata/prometheus-metrics.golden @@ -74,7 +74,14 @@ "ignore_health_on_host_removal": false, "connect_timeout": "5s", "type": "STATIC", - "http_protocol_options": {}, + "typed_extension_protocol_options": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicit_http_config": { + "http_protocol_options": {} + } + } + }, "loadAssignment": { "clusterName": "prometheus_backend", "endpoints": [ diff --git a/test/integration/connect/envoy/main_test.go b/test/integration/connect/envoy/main_test.go index b81a72e37ddc..aec7f580cc7e 100644 --- a/test/integration/connect/envoy/main_test.go +++ b/test/integration/connect/envoy/main_test.go @@ -28,9 +28,9 @@ func TestEnvoy(t *testing.T) { caseDir := "CASE_DIR=" + tc t.Cleanup(func() { - if t.Failed() { - runCmd(t, "capture_logs", caseDir) - } + //if t.Failed() { + runCmd(t, "capture_logs", caseDir) + //} runCmd(t, "test_teardown", caseDir) })