I'm trying to proxy HTTP requests to external proxy with Istio egress gateway+ServiceEntry or ServiceEntry+VirtualService, adding a HTTP header before route request to external proxy but I don't find a similar example.
Is it possible ?
I've proved different configurations but they didn't work.
For example:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: proxy
namespace: lab
spec:
hosts:
- externalproxy
location: MESH_EXTERNAL
ports:
- number: 3128
name: http
protocol: HTTP
resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: proxy-virtualservice
namespace: lab
spec:
hosts:
- myservice
http:
- match:
port: 3128
rewrite:
authority: externalproxy
route:
- destination:
host: externalproxy
port:
number: 3128
headers:
request:
add:
myheader: test
Thanks