-
Notifications
You must be signed in to change notification settings - Fork 893
75 lines (59 loc) · 2.29 KB
/
kserve_cni_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build & Apply KServe manifests in KinD, using istio CNI
on:
pull_request:
paths:
- .github/workflows/kserve_cni_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- common/istio-cni-1-22/**
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- tests/gh-actions/install_knative-cni.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install KinD
run: ./tests/gh-actions/install_kind.sh
- name: Create KinD Cluster
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml
- name: Install Calico
run: |
chmod +x ./tests/gh-actions/install_calico.sh
./tests/gh-actions/install_calico.sh
- name: Install kustomize
run: ./tests/gh-actions/install_kustomize.sh
- name: Create kubeflow namespace
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -
- name: Install Istio CNI
run: ./tests/gh-actions/install_istio-cni.sh
- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh
- name: Install knative CNI
run: ./tests/gh-actions/install_knative-cni.sh
- name: Build & Apply manifests
run: ./tests/gh-actions/install_kserve.sh
- name: Create test namespace
run: kubectl create ns kserve-test
- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install test dependencies
run: pip install -r ./contrib/kserve/tests/requirements.txt
- name: Port forward
run: |
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &
- name: Run kserve tests
run: |
export KSERVE_INGRESS_HOST_PORT=localhost:8080
cd ./contrib/kserve/tests && pytest .
- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app