Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: networking.istio.io/v1beta1
- kind: VirtualService
- metadata:
- name: geth-dedicated
- namespace: default
- spec:
- gateways:
- - geth-dedicated
- hosts:
- - <domain>
- http:
- - match:
- - uri:
- prefix: /
- name: geth-public
- route:
- - destination:
- host: geth-dedicated
- port:
- number: 8545
- ---
- apiVersion: networking.istio.io/v1alpha3
- kind: EnvoyFilter
- metadata:
- name: dumb-filter
- namespace: istio-system
- spec:
- workloadSelector:
- labels:
- istio: ingressgateway
- configPatches:
- - applyTo: HTTP_ROUTE
- match:
- routeConfiguration:
- vhost:
- route:
- # name from virtual service route that the filter should apply to
- name: geth-public
- patch:
- operation: MERGE
- value:
- # 'custom' as prefix, can be anything
- name: custom.dumb-filter
- # set lua per route filter
- typed_per_filter_config:
- envoy.filters.http.lua:
- "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
- source_code:
- inline_string: |
- function envoy_on_response(response_handle)
- response_handle:headers():add("dm3ch-test", "dm3ch")
- response_handle:logErr("Bye Bye.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement