Skip to content

Commit

Permalink
Knative: Use istio's local gateway (#2048)
Browse files Browse the repository at this point in the history
By default Knative's local gateway will use the istio-ingressgateway Pod
for configuring traffic and binding VirtualServices. This means that all
in-cluster traffic will need to also pass via the ingress gateway.

We've noticed 302s from Notebooks curl-ing InferenceServices. This was
because the AuthService is authenticating all requests that go through
the ingress gateway. But since we now send in-cluster requests via the
ingress gateway this means that AuthService will also check them.

To avoid the above we provide an overlay for making Knative's local
gateway to use Istio's local gateway and not the ingress one.

See: #1966

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
  • Loading branch information
kimwnasptd authored Oct 7, 2021
1 parent 74e04b1 commit ade83a6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

# We want to Knative to use Istio's local Gateway and not the Ingress Gateway
# See: https://github.com/kubeflow/manifests/issues/1966
patchesStrategicMerge:
- patches/gateway-selectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: knative-local-gateway
namespace: knative-serving
spec:
selector:
app: cluster-local-gateway
istio: cluster-local-gateway
---
apiVersion: v1
kind: Service
metadata:
name: knative-local-gateway
namespace: istio-system
spec:
selector:
app: cluster-local-gateway
istio: cluster-local-gateway

0 comments on commit ade83a6

Please sign in to comment.