我正在尝试使用Istio出口网关+ ServiceEntry或ServiceEntry + VirtualService将HTTP请求代理到外部代理,在将请求路由到外部代理之前添加HTTP标头,但是找不到类似的示例。
有可能吗?
我已经证明了不同的配置,但是它们不起作用。
例如:
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
谢谢