From 1c1ec859bab1d8d4e94b573b7da26f3e6d0ce8b4 Mon Sep 17 00:00:00 2001 From: ctrlaltluc <96051211+ctrlaltluc@users.noreply.github.com> Date: Tue, 12 Jul 2022 10:36:12 +0300 Subject: [PATCH] Add Envoy support for HTTP/1.0 health-check requests (#47) Co-authored-by: Lucian Ilie --- .../tests/kafkacluster_controller_envoy_test.go | 10 ++++++++++ pkg/resources/envoy/configmap.go | 3 +++ 2 files changed, 13 insertions(+) diff --git a/controllers/tests/kafkacluster_controller_envoy_test.go b/controllers/tests/kafkacluster_controller_envoy_test.go index 1224952e2..c33014e06 100644 --- a/controllers/tests/kafkacluster_controller_envoy_test.go +++ b/controllers/tests/kafkacluster_controller_envoy_test.go @@ -357,6 +357,8 @@ staticResources: - name: envoy.filters.http.router typedConfig: '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + httpProtocolOptions: + acceptHttp10: true routeConfig: name: local virtualHosts: @@ -693,6 +695,8 @@ staticResources: - name: envoy.filters.http.router typedConfig: '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + httpProtocolOptions: + acceptHttp10: true routeConfig: name: local virtualHosts: @@ -960,6 +964,8 @@ staticResources: - name: envoy.filters.http.router typedConfig: '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + httpProtocolOptions: + acceptHttp10: true routeConfig: name: local virtualHosts: @@ -1280,6 +1286,8 @@ staticResources: - name: envoy.filters.http.router typedConfig: '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + httpProtocolOptions: + acceptHttp10: true routeConfig: name: local virtualHosts: @@ -1600,6 +1608,8 @@ staticResources: - name: envoy.filters.http.router typedConfig: '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + httpProtocolOptions: + acceptHttp10: true routeConfig: name: local virtualHosts: diff --git a/pkg/resources/envoy/configmap.go b/pkg/resources/envoy/configmap.go index 9e3e7dd36..3394bfc1c 100644 --- a/pkg/resources/envoy/configmap.go +++ b/pkg/resources/envoy/configmap.go @@ -128,6 +128,9 @@ func generateEnvoyHealthCheckListener(ingressConfig v1beta1.IngressConfig, log l } healthCheckFilter := &envoyhcm.HttpConnectionManager{ + HttpProtocolOptions: &envoycore.Http1ProtocolOptions{ + AcceptHttp_10: true, + }, StatPrefix: fmt.Sprintf("%s-healthcheck", envoyutils.AllBrokerEnvoyConfigName), RouteSpecifier: &envoyhcm.HttpConnectionManager_RouteConfig{ RouteConfig: &envoyroute.RouteConfiguration{