【发布时间】:2023-03-16 11:50:01
【问题描述】:
我需要从 EnvoyFilter 中排除特定主机,如下所示:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: authn-filter
spec:
workloadLabels:
istio: ingressgateway
filters:
- filterConfig:
httpService:
serverUri:
uri: http://authservice.$(namespace).svc.cluster.local
cluster: outbound|8080||authservice.$(namespace).svc.cluster.local
failureModeAllow: false
timeout: 10s
authorizationRequest:
allowedHeaders:
patterns:
- exact: "cookie"
- exact: "X-Auth-Token"
authorizationResponse:
allowedUpstreamHeaders:
patterns:
- exact: "kubeflow-userid"
statusOnError:
code: GatewayTimeout
filterName: envoy.ext_authz
filterType: HTTP
insertPosition:
index: FIRST
listenerMatch:
listenerType: GATEWAY
问题是过滤器适用于默认的 istio 入口网关,它会影响通过该网关的所有流量,我希望有一些主机可以从过滤器中排除/列入白名单。
【问题讨论】:
-
我唯一发现的就是here,但我不确定它是否有效。也许您可以考虑将其从 istio 入口网关更改为特定的 pod 标签、命名空间,如 istio documentation 中提到的?
-
您找到解决方案了吗?
标签: kubernetes istio