Configuring low-level envoy proxy settings in the consul-api-gateway

Hello, I was trying to follow this guide to configure the underlying envoy proxy of the consul-api-gateway. My goal was to add the Lua http filter to the envoy proxy in the consul-api-gateway.

My config file looks like this:

kind: ProxyDefaults
  name: global
      name: envoy.filters.http.lua
        inline_code: |
          -- Called on the response path.
          function envoy_on_response(response_handle)
            response_handle:headers():add("some_header", "some_value")

I used the command kubectl apply -f filename.yaml to apply it. No matter what I do I can’t seem to get any config changes to work for the envoy proxy. Any advice as to what I’m doing wrong would be greatly appreciated. Thanks!

Hi @immabird unfortunately ProxyDefaults only apply to specific mesh service proxies (i.e. services that aren’t gateways). There have been some issues created some time ago to allow for adding escape hatch overrides to ingress gateways (API Gateways are custom ingress gateways):

and the corresponding GitHub issue here:

from a corresponding comment in another issue, it looks like we just got this put on an internal roadmap for the core Consul team, but I can’t give you an estimate as to when this would be supported yet:

Thanks for the detailed information! I was not aware there was a distinction between gateways and services I thought they were treated equally as part of the mesh. You saved me a lot of time because I was determined to keep trying things until it worked lol.