GKE 网关 API、HTTPRoute 对于“URLRewrite”过滤器的路径类型“ReplaceFullPath”无效,即使它应该可以工作

问题描述 投票:0回答:1

我在 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端有问题?

google-kubernetes-engine api-gateway
1个回答
0
投票

我与谷歌的解决方案工程师讨论过,问题似乎出在他们的文档上。它们支持

replaceFullPath
任何网关类上的过滤器。

文档现已更新,仅显示replacePrefixMatch(请参阅本页底部)。

© www.soinside.com 2019 - 2024. All rights reserved.