Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua Envoy extension outbound listener is not working #21966

Open
ChocolateAceCream opened this issue Nov 22, 2024 · 0 comments
Open

Lua Envoy extension outbound listener is not working #21966

ChocolateAceCream opened this issue Nov 22, 2024 · 0 comments

Comments

@ChocolateAceCream
Copy link
Contributor

Overview of the Issue

I'm following documentation of lua envoy extension and try to setup both inbound and outbound listener. Inbound extension works good but outbound one is not working. When I check the log of my consul-dataplane in my service deployment pod, I found this:

2024-11-22T04:12:56.174Z+00:00 [info] envoy.lua(14) envoy_on_response() function not found. Lua filter will not hook responses.

Could anyone provide a working example of how to setup a outbound listener?

P.S. When I apply the change use kubectl apply, seems like this change is not take effect. So everytime I have first kubectl delete and then kubectl apply to make those change take effection. Am I missing anything or it's the expected behavior?


Reproduction Steps

My serviceDefault config is like this

envoyExtensions:
  - name: "builtin/lua" # has to be this so it can be recognized by envoy
    arguments:
      proxyType: "connect-proxy"
      listener: "inbound"
      script: |-
        function envoy_on_request(request_handle)
          request_handle:logInfo("simple log test")
          request_handle:headers():add("x-consul-service", "auth-service")
        end
  - name: "builtin/lua" # has to be this so it can be recognized by envoy
    arguments:
      proxyType: "connect-proxy"
      listener: "outbound"
      script: |-
        function envoy_on_response(request_handle)
          request_handle:logInfo("---outbound!!!---")
        end
  - name: builtin/ext-authz
    arguments:
      listenerType: inbound
      proxyType: connect-proxy
      config:
        httpService:
          target:
            service:
              name: eks-micro-auth-service
              namespace: default
            timeout: "5s" # Required timeout field

both inbound listener and ext-authz works for me, but when I check the log of my consul-dataplane in my service deployment pod, I found this:

2024-11-22T04:12:56.174Z+00:00 [info] envoy.lua(14) envoy_on_response() function not found. Lua filter will not hook responses.

Consul info for both Client and Server

Client info
Output from client 'consul info' command here
Client agent HCL config
Server info
Output from server 'consul info' command here
Server agent HCL config

Operating system and Environment details

Log Fragments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant