From b0f6c373fee297517cd282c140f7c6520ceb2ac1 Mon Sep 17 00:00:00 2001 From: Lukas Grundmann Date: Thu, 28 Jul 2022 13:16:26 +0200 Subject: [PATCH] Fix issues with recent Emissary-Ingress version (#211) * Added mitigation of the matching problem due the port in the GRPC Host header. Signed-off-by: Lukas Grundmann * Emissary Ingress subchart deploys default listener by default. Signed-off-by: Lukas Grundmann --- build/package/helm/monoskope/values.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/package/helm/monoskope/values.yaml b/build/package/helm/monoskope/values.yaml index b26c4fd69..3f5e0da3e 100644 --- a/build/package/helm/monoskope/values.yaml +++ b/build/package/helm/monoskope/values.yaml @@ -198,7 +198,20 @@ ambassador: enabled: false adminService: create: false + createDefaultListeners: true module: + # from https://github.com/emissary-ingress/emissary/issues/2276 + # strips away any port from the Host header before route mapping + lua_scripts: | + function envoy_on_request(request_handle) + local authority = request_handle:headers():get(":authority") + if(string.find(authority, ":") ~= nil) + then + local authority_index = string.find(authority, ":") + local stripped_authority = string.sub(authority, 1, authority_index - 1) + request_handle:headers():replace(":authority", stripped_authority) + end + end strip_matching_host_port: true # necessary for gRPC, see https://www.getambassador.io/docs/emissary/latest/howtos/grpc/#mappings-with-hosts scimserver: