Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions components/infra/gateway-api/base/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@ spec:
allowedRoutes:
namespaces:
from: All

# HTTPS default listener for clients without SNI (e.g. Apache mod_proxy_hcheck)
- name: https-default
protocol: HTTPS
port: 443
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: developers-tls-certificate
namespace: apps
allowedRoutes:
namespaces:
from: All
30 changes: 30 additions & 0 deletions components/infra/gateway-api/base/health-probe-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Apache's mod_proxy_hcheck does not send the SNI (Server Name Indication)
# extension during its background TLS health checks. Without SNI, Envoy
# Gateway routes the connection to the hostname-less "https-default" listener.
# However, HTTPRoutes that specify hostnames (e.g. *.developers.facilities.rl.ac.uk)
# are not matched on the default listener, resulting in a 404.
#
# This dedicated HTTPRoute has NO hostnames and is pinned to the "https-default"
# listener via sectionName, so it matches any Host header on non-SNI connections
# and routes health check requests to the correct backend.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: health-probe
namespace: apps
labels:
app: health-probe
spec:
# No hostnames — matches any Host header on the attached listener
parentRefs:
- name: envoy-gateway
namespace: envoy-gateway-system
sectionName: https-default # Only attach to the no-SNI fallback listener
rules:
- matches:
- path:
type: PathPrefix
value: /auth/Ready
backendRefs:
- name: authenticate-frontend
port: 3000
1 change: 1 addition & 0 deletions components/infra/gateway-api/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ resources:
- envoy-proxy-config.yaml
- gateway.yaml
- gatewayclass.yaml
- health-probe-route.yaml
- https-redirect.yaml
- reference-grant.yaml