istio - 在 YAML 中为 Istio EnvoyFilter 设置请求缓冲区
问题描述
你能帮我指定 YAML Istio EnvoyFilter 来拥有请求缓冲区,类似于 Nginx 请求缓冲区。我试过了
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: connection
namespace: my-test
spec:
workloadSelector:
labels:
role: backend
configPatches:
- applyTo: LISTENER
match:
context: SIDECAR_INBOUND
patch:
operation: MERGE
value:
per_connection_buffer_limit_bytes: 21000000.0 #21MB
这已成功应用于集群,但未按预期工作
谢谢
UPD 这有效(对于 istio 1.5)
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: connection
namespace: my-test
spec:
filters:
- filterName: envoy.buffer
filterType: HTTP
filterConfig:
maxRequestBytes: 21000000.0 #21MB
UPD 2 这有效(对于 istio 1.8)
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: filter-buffersize-limit
namespace: istio-system
spec:
workloadSelector:
labels:
istio: ingressgateway
configPatches:
- applyTo: HTTP_FILTER
match:
context: GATEWAY
listener:
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
subFilter:
name: "envoy.filters.http.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.buffer
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.buffer.v3.Buffer
max_request_bytes: 26214400 # 25 MB.
解决方案
推荐阅读
- asp.net - 在 asp.net 框架 Web 应用程序中上传图像文件
- powershell - 从 Powershell ISE 和 Windows 资源管理器运行脚本的不同行为
- javascript - 关于 Discord 中的嵌入 (JAVASCRIPT)
- css - Buey Modal 滚动条出现在两个轴上,我只想要 y 轴滚动条
- registry - 两个问题 - 我正在尝试修改注册表,但出现错误
- google-apps-script - Google Docs / Apps 脚本:插入带有样式的文本
- python-3.x - 分组条形图调整绘图区域的大小
- java - Spring Data MongoDB 与 Mongo Atlas 的连接抛出“未发送 SNI 名称,请确保使用 MongoDB 3.4+ 驱动程序/shell”错误
- swift - 从视图 SwiftUI 调用函数
- node.js - 实际使用 JWT 和 cookie 进行身份验证