Skip to content

Commit 61ea8de

Browse files
committed
fix
Signed-off-by: Harshvir Potpose <[email protected]>
1 parent b028e63 commit 61ea8de

File tree

2 files changed

+31
-24
lines changed

2 files changed

+31
-24
lines changed

.github/workflows/model_registry_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ jobs:
8888
-H 'accept: application/json'
8989
9090
# for these steps below ensure same steps as kserve (ie: Istio with external authentication, cert-manager, knative) so to achieve same setup
91-
- name: Port forward Istio gateway
92-
run: ./tests/port_forward_istio_gateway.sh
91+
- name: Port forward
92+
run: ./tests/port_forward_gateway.sh
9393

9494
- name: Dry-run KF Model Registry REST API
9595
run: |

tests/kserve_test.sh

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SCRIPT_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
66
TEST_DIRECTORY="${SCRIPT_DIRECTORY}/kserve"
77

88
echo "=== KServe Predictor Service Labels ==="
9-
kubectl get pods -n ${NAMESPACE} -l serving.knative.dev/service=isvc-sklearn-predictor --show-labels
9+
kubectl get pods -n ${NAMESPACE} -l serving.knative.dev/service=isvc-sklearn-predictor --show-labels || true
1010

1111
cat <<EOF | kubectl apply -f -
1212
apiVersion: security.istio.io/v1beta1
@@ -27,31 +27,38 @@ spec:
2727
EOF
2828

2929
cat <<EOF | kubectl apply -f -
30-
apiVersion: networking.istio.io/v1beta1
31-
kind: VirtualService
30+
apiVersion: gateway.networking.k8s.io/v1
31+
kind: HTTPRoute
3232
metadata:
3333
name: isvc-sklearn-external
3434
namespace: ${NAMESPACE}
3535
spec:
36-
gateways:
37-
- kubeflow/kubeflow-gateway
38-
hosts:
39-
- '*'
40-
http:
41-
- match:
42-
- uri:
43-
prefix: /kserve/${NAMESPACE}/isvc-sklearn/
44-
rewrite:
45-
uri: /
46-
route:
47-
- destination:
48-
host: knative-local-gateway.istio-system.svc.cluster.local
49-
headers:
50-
request:
51-
set:
52-
Host: isvc-sklearn-predictor.${NAMESPACE}.svc.cluster.local
53-
weight: 100
54-
timeout: 300s
36+
parentRefs:
37+
- name: kubeflow-gateway
38+
namespace: istio-system
39+
rules:
40+
- matches:
41+
- path:
42+
type: PathPrefix
43+
value: /kserve/${NAMESPACE}/isvc-sklearn/
44+
filters:
45+
- type: URLRewrite
46+
urlRewrite:
47+
path:
48+
type: ReplacePrefixMatch
49+
replacePrefixMatch: /
50+
- type: RequestHeaderModifier
51+
requestHeaderModifier:
52+
set:
53+
- name: Host
54+
value: isvc-sklearn-predictor.${NAMESPACE}.svc.cluster.local
55+
backendRefs:
56+
- name: knative-local-gateway
57+
namespace: istio-system
58+
port: 80
59+
weight: 100
60+
timeouts:
61+
request: 300s
5562
EOF
5663

5764
if ! command -v pytest &> /dev/null; then

0 commit comments

Comments
 (0)