seldon-core icon indicating copy to clipboard operation
seldon-core copied to clipboard

Istio enabled Seldon core: Support for URI re-write customization in VirtualService created by the controller.

Open kpriyank20 opened this issue 4 years ago • 6 comments

In case of ambassador, the deployed model endpoints can be easily customized with URI path re-write option with the below annotation - seldon.io/ambassador-config

Example SeldonDeployment: apiVersion: machinelearning.seldon.io/v1alpha2 kind: SeldonDeployment metadata: creationTimestamp: '2021-07-06T13:15:24Z' ................ ................ ........ spec: annotations: ....... project-name: test_project seldon.io/ambassador-config: | --- apiVersion: ambassador/v2 kind: Mapping name: seldon_testmodel_default_rest_mapping1 prefix: /xyz/test_project/testmodel/ rewrite: / service: testmodel-default.svc:9000 timeout_ms: 300000 --- ............

However, if Istio ingress is enabled in seldon core operator, the related virtual service is auto generated by the controller and I could not find any documentation on seldon.io, on how we can customize the model endpoints in the virtual service to achieve similar flexibility as offered in case of ambassador.

Kindly share the relevant documentation if this is possible ? If not, is there any road map to extend customized URI re-write feature to istio virtual service creation as well ?

kpriyank20 avatar Aug 29 '21 16:08 kpriyank20

No you are right we have limited customization functionality at present: https://docs.seldon.io/projects/seldon-core/en/latest/ingress/istio.html#istio-configuration-annotation-reference

Can you describe your use case?

ukclivecox avatar Sep 02 '21 14:09 ukclivecox

The use case we have is - we are using seldon core operator to manage ML models deployment on RedHat OpenShift cluster. While doing so we are using Istio ingress to expose the MLOps endpoints to external systems, so requirement here is to have some custom URI prefix path instead of the default prefix, in the auto generated Istio virtual service as shown below -

apiVersion: networking.istio.io/v1alpha3 kind: VirtualService ................. ................ - match: - uri: prefix: /seldon/<namespace_name>/<deployment_name>/ rewrite: uri: / ................

kpriyank20 avatar Sep 06 '21 15:09 kpriyank20

If we had a single vanilla SVC endpoint for all models then we could allow users to add any istio resources as needed as the spec for these would be of a predictable nature. This is something we are investigating for v2 APIs in core. This would allow you to create any customized istio resources as needed when deploying a model.

ukclivecox avatar Sep 22 '21 12:09 ukclivecox

Thanks for the update @cliveseldon , is there any release timeline targeted for making the customized istio resources feature available ? Or does the recent releases say 1.11.x has any support on these lines ?

kpriyank20 avatar Oct 19 '21 08:10 kpriyank20

Not exactly - 1.12 will hopefully have https://github.com/SeldonIO/seldon-core/pull/3609 which may help We do have functionality like this for Ambassador. We'd be open to a PR if you want to look at it or propose one.

ukclivecox avatar Oct 19 '21 08:10 ukclivecox

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 03 '22 02:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 14 '22 02:08 github-actions[bot]