Skip to content

Commit

Permalink
Add Envoy support for HTTP/1.0 health-check requests (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucian Ilie <[email protected]>
  • Loading branch information
ctrlaltluc and ctrlaltluc authored Jul 12, 2022
1 parent b1251b9 commit 1c1ec85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions controllers/tests/kafkacluster_controller_envoy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions pkg/resources/envoy/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 1c1ec85

Please sign in to comment.