Advertisement
Dm3Ch

Untitled

Oct 19th, 2021
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. apiVersion: networking.istio.io/v1beta1
  2. kind: VirtualService
  3. metadata:
  4. name: geth-dedicated
  5. namespace: default
  6. spec:
  7. gateways:
  8. - geth-dedicated
  9. hosts:
  10. - <domain>
  11. http:
  12. - match:
  13. - uri:
  14. prefix: /
  15. name: geth-public
  16. route:
  17. - destination:
  18. host: geth-dedicated
  19. port:
  20. number: 8545
  21. ---
  22. apiVersion: networking.istio.io/v1alpha3
  23. kind: EnvoyFilter
  24. metadata:
  25. name: dumb-filter
  26. namespace: istio-system
  27. spec:
  28. workloadSelector:
  29. labels:
  30. istio: ingressgateway
  31. configPatches:
  32. - applyTo: HTTP_ROUTE
  33. match:
  34. routeConfiguration:
  35. vhost:
  36. route:
  37. # name from virtual service route that the filter should apply to
  38. name: geth-public
  39. patch:
  40. operation: MERGE
  41. value:
  42. # 'custom' as prefix, can be anything
  43. name: custom.dumb-filter
  44. # set lua per route filter
  45. typed_per_filter_config:
  46. envoy.filters.http.lua:
  47. "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
  48. source_code:
  49. inline_string: |
  50. function envoy_on_response(response_handle)
  51. response_handle:headers():add("dm3ch-test", "dm3ch")
  52. response_handle:logErr("Bye Bye.")
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement