EnvoyFilterUsesRemoveOperationIncorrectly

消息名称EnvoyFilterUsesRemoveOperationIncorrectly
消息代码IST0154
描述The REMOVE operation will be ignored when applyTo is set to ROUTE_CONFIGURATION, or HTTP_ROUTE.
等级Error

EnvoyFilter 使用 REMOVE 操作并且 ApplyTo 设置为 ROUTE_CONFIGURATIONHTTP_ROUTE 时会出现此消息。这将导致 REMOVE 操作被忽略。 目前只有 MERGE 操作可以用于 ROUTE_CONFIGURATION

示例

考虑一个带有 REMOVE 补丁操作的 EnvoyFilter,其中这个 EnvoyFilter 将被忽略:

  1. apiVersion: networking.istio.io/v1alpha3
  2. kind: EnvoyFilter
  3. metadata:
  4. name: test-remove-2
  5. namespace: bookinfo
  6. spec:
  7. workloadSelector:
  8. labels:
  9. app: mysvc2
  10. configPatches:
  11. - applyTo: ROUTE_CONFIGURATION
  12. match:
  13. context: GATEWAY
  14. listener:
  15. filterChain:
  16. sni: app.example.com
  17. filter:
  18. name: "envoy.filters.network.http_connection_manager.InternalAddressConfig"
  19. patch:
  20. operation: REMOVE