istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/testdata/networking/envoyfilter-without-service/configs.yaml (about) 1 # Authentication policy to enable mutual TLS for all services (that have sidecar) in the mesh. 2 apiVersion: security.istio.io/v1beta1 3 kind: PeerAuthentication 4 metadata: 5 name: default 6 namespace: istio-config 7 spec: 8 mtls: 9 mode: STRICT 10 --- 11 # Corresponding destination rule to configure client side to use mutual TLS when talking to 12 # any service (host) in the mesh. 13 apiVersion: networking.istio.io/v1alpha3 14 kind: DestinationRule 15 metadata: 16 name: default 17 namespace: istio-config 18 spec: 19 host: "*.local" 20 trafficPolicy: 21 tls: 22 mode: ISTIO_MUTUAL 23 --- 24 # Services and configs in ns1 namespace 25 apiVersion: networking.istio.io/v1alpha3 26 kind: ServiceEntry 27 metadata: 28 name: http1 29 namespace: ns1 30 spec: 31 hosts: 32 - http1.ns1.svc.cluster.local 33 addresses: 34 - 2.1.1.1 35 ports: 36 - number: 8081 37 name: http 38 protocol: HTTP2 39 location: MESH_INTERNAL 40 resolution: STATIC 41 endpoints: 42 - address: 100.1.1.1 43 labels: 44 version: v1 45 ports: 46 http: 8080 47 --- 48 # The sidecar for the consumer only application 49 apiVersion: networking.istio.io/v1alpha3 50 kind: EnvoyFilter 51 metadata: 52 name: test-lua 53 namespace: istio-system 54 spec: 55 workloadSelector: 56 labels: 57 app: envoyfilter-test-app 58 configPatches: 59 - applyTo: HTTP_FILTER 60 match: 61 listener: 62 filterChain: 63 filter: 64 name: "envoy.filters.network.http_connection_manager" 65 subFilter: 66 name: "envoy.filters.http.router" 67 patch: 68 operation: INSERT_BEFORE 69 value: # lua filter specification 70 name: envoy.lua 71 typed_config: 72 "@type": "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua" 73 inlineCode: | 74 function envoy_on_request(request_handle) 75 request_handle:logWarn("Hello World") 76 end