Nag*_*adi 5 redhat routes openshift istio servicemesh
我在带有 istio 服务网格的 openshift 容器平台中部署了一个容器化应用程序/服务。在 istio 虚拟服务 yaml 中,我想验证 http 请求是否具有标头(例如:版本)且值为 v1。我在虚拟服务 yaml 中添加了以下配置来验证标头。但我正在寻找可用的选项,使用 loadbalancer/ingress/openshif 路由等在 HTTP 请求中注入此标头。因为我的 istio-ingressgateway 服务是使用 ClusterIp 部署的。我使用 openshift 路由将外部流量发送到 ingressgateway。请分享向http请求添加标头的可能方法
http:
- match:
- headers: # Match header
version: # header that we decided for dark release
exact: v1 # exact match
Run Code Online (Sandbox Code Playgroud)
小智 0
应该可以使用 virtualService 像
spec:
hosts:
- "example.com"
gateways:
- your-gateway
http:
-
name: remove-headers
headers:
request:
remove:
- yourHeader
Run Code Online (Sandbox Code Playgroud)
但我无法让它发挥作用。如果可以的话请分享:)
| 归档时间: |
|
| 查看次数: |
3384 次 |
| 最近记录: |