Я пытаюсь настроить фильтр lua envoy для работы со шлюзом istio, но я добавил его в кластер, и он работает так, как будто фильтра не существует.
Я настроил свой кластер istio на GKE, используя это руководство https://istio.io/docs/setup/kubernetes/install/kubernetes/.
У кого-нибудь была такая же проблема?
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: edge-lua-filter
spec:
workloadLabels:
app: httpbin-gateway
filters:
- listenerMatch:
listenerType: GATEWAY
filterName: envoy.lua
filterType: HTTP
filterConfig:
inlineCode: |
-- Called on the request path.
function envoy_on_request(request_handle)
request_handle:headers():add("foo", "bar")
end
-- Called on the response path.
function envoy_on_response(response_handle)
body_size = response_handle:body():length()
response_handle:headers():add("response-body-size", tostring(body_size))
end
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: httpbin-gateway
namespace: foo
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: httpbin
namespace: foo
spec:
hosts:
- "*"
gateways:
- httpbin-gateway
http:
- route:
- destination:
port:
number: 8000
host: httpbin.foo.svc.cluster.local