knative / serving

Kubernetes-based, scale-to-zero, request-driven compute
https://knative.dev/docs/serving/
Apache License 2.0
5.55k stars 1.16k forks source link

VirtualService and stuff deployed with InferenceService gets overridden #15580

Open A923357 opened 3 days ago

A923357 commented 3 days ago

Hello everyone,

I'm working on creating an OAuth 2.0 service using Kubeflow, Istio, and KServe. As part of this setup, I need to add a custom response header to my Istio VirtualService, which is managed by a KServe InferenceService. Additionally, I've configured an Istio EnvoyFilter to handle invalid tokens by converting 302 redirects into appropriate 40X error codes.

Initially, everything works perfectly—the custom header is added, and invalid tokens are handled correctly without causing 302 redirects. However, after a few hours, I notice that:

  1. My VirtualService configuration is being overridden, removing the custom response header.
  2. The system reverts to returning 302 redirects instead of the intended 40X error codes.
  3. The service stops working as expected due to these changes.
  4. I've read in some forums that this issue might be related to the Knative-KServe reconciliation process, where Knative periodically reconciles resources and may overwrite custom configurations in Istio resources like VirtualService. I'm not entirely certain if this is the cause, but it seems plausible given the symptoms.

My questions are:

I've also posted this issue in the KServe repository but wanted to reach out here for additional insights and assistance.

Any guidance or suggestions on how to resolve this issue would be greatly appreciated!

Thank you for your help.

- knative-serving version: 1.8.1

skonto commented 3 days ago

Hi @A923357 I recommend that you ask first at the KServe side. The virtual service Knative touches is the one it generates, cc @ReToCode in case I missed something. Btw I suspect you could debug this by using raw deployments at the KServe side (instead of serverless mode) and see how things work the reconciliation. In any case pls ask Kserve community providing mode details about the resources touched.

ReToCode commented 4 hours ago

+1 on asking the KServe folks.