forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature kandrio path based (kubeflow#2357)
* Take disableIstioVirtualHost and urlScheme from ingressConfig Commit 48f45eb introduced disableIstioVirtualHost in ingressConfig and updated various functions to take this as an option. Update codebase to use ingressConfig directly. This way we can use the urlScheme and later on the pathTemplate without changing the prototype of the methods. Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> * Introduce pathTemplate in ingressConfig Extend the IngressConfig struct with a pathTemplate field to enable path-based routing. If this is set the user must also provide ingressDomain and urlScheme. Validate the given template just by trying to parse it. The user is responsible for providing a valid template that is unique for a given inference service, for example, by using both namespace and name in the template. Introduce a path module (similar to the existing domain) that has GenerateUrlPath() helper. This will will try to render the pathTemplate based on the name and namespace of an isvc. Add unittests for this new helper. Refs kserve/kserve#2257 Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> Signed-off-by: Kostis Andriopoulos <kandrio@arrikto.com> * Add path-based rule in top-level VirtualService Extend the Ingress reconciler to add a matching rule in the top-level VirtualService of each InferenceService if the 'pathTemplate' field is not empty. Specifically adds a VirtualService rule that redirects path-based requests from the public to the local gateway. Also extend the list of hosts to include the ingressDomain. Modify existing getServiceUrl() to take into account pathTemplate. Update unittests accordingly. Refs kserve/kserve#2257 Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> Signed-off-by: Kostis Andriopoulos <kandrio@arrikto.com> * Add e2e tests for path-based routing Extend e2e tests to test path-based routing. Specifically, extend the test-fast job, to patch the inferenceservice-config to set pathTemplate, ingressDomain, and urlScheme and re-run the fast tests. Update predict() to take into account service urls with paths. Closes kserve/kserve#2257 Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> --------- Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> Signed-off-by: Kostis Andriopoulos <kandrio@arrikto.com> Co-authored-by: Dimitris Aragiorgis <dimara@arrikto.com>
- Loading branch information
Showing
11 changed files
with
422 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
config/overlays/test/configmap/inferenceservice-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: inferenceservice-config | ||
namespace: kserve | ||
data: | ||
ingress: |- | ||
{ | ||
"ingressGateway" : "knative-serving/knative-ingress-gateway", | ||
"ingressService" : "istio-ingressgateway.istio-system.svc.cluster.local", | ||
"localGateway": "knative-serving/knative-local-gateway", | ||
"localGatewayService" : "knative-local-gateway.istio-system.svc.cluster.local", | ||
"ingressClassName" : "istio", | ||
"domainTemplate": "{{ .Name }}-{{ .Namespace }}.{{ .IngressDomain }}", | ||
"urlScheme": "http", | ||
"pathTemplate": "/serving/{{ .Namespace }}/{{ .Name }}", | ||
"ingressDomain": "mydomain.com" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.