我在 GKE 上有一个带有 HTTPRoute 的网关(网关 API),其设置如下:
- matches:
- path:
type:
value: /prefix/health
backendRefs:
- name: some-backend
port: some-port
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplaceFullPath
replaceFullPath: /ready
当我查看网关对象时,我看到此错误:
Error GWCER104: HTTPRoute "my-httproute"
is misconfigured, err: invalid path type "ReplaceFullPath" configured for "URLRewrite"
filter, path type must be "ReplacePrefixMatch".
网关类是
gke-l7-global-external-managed
,根据文档,它与这些过滤器兼容(此处,请查看urlRewrite.path
旁边的底部)。
我遵循了过滤器的 API 规范文档。
是我写的方式有问题,还是GKE Gateway端有问题?
我与谷歌的解决方案工程师讨论过,问题似乎出在他们的文档上。它们不支持
replaceFullPath
在任何网关类上的过滤器。
文档现已更新,仅显示replacePrefixMatch(请参阅本页底部)。