Skip to content

Commit

Permalink
Merge branch 'edit-servers' of https://github.com/markwinter/models-w…
Browse files Browse the repository at this point in the history
…eb-app into edit-servers
  • Loading branch information
markwinter committed Jun 21, 2022
2 parents fdea562 + aaa8276 commit b1a1475
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMG ?= gcr.io/kfserving/models-web-app
IMG ?= kserve/models-web-app

# We want the git tag to be the last commit to this directory so we don't
# bump the image on unrelated changes.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The web app currently works with `v1beta1` versions of `InferenceService` object

## Connect to the app

The web app is installed alongside the other KFServing components, either in the `kfserving-system` or in the `kubeflow` namespace. There is a `VirtualService` that exposes the app via an Istio Ingress Gateway. Depending on the installation environment the following Ingress Gateway will be used.
The web app is installed alongside the other KServe components, either in the `kserve` or in the `kubeflow` namespace. There is a `VirtualService` that exposes the app via an Istio Ingress Gateway. Depending on the installation environment the following Ingress Gateway will be used.

| Installation mode | IngressGateway |
| - | - |
| Standalone KFServing | knative-ingress-gateway.knative-serving |
| Standalone KServe | knative-ingress-gateway.knative-serving |
| Kubeflow | kubeflow-gateway.kubeflow |

To access the app you will need to navigate with your browser to
Expand All @@ -27,11 +27,11 @@ You can apply the mentioned configurations by doing the following commands:
```bash
# edit the configmap
# CONFIG=config/overlays/kubeflow/kustomization.yaml
CONFIG=config/web-app/kustomization.yaml
CONFIG=config/base/kustomization.yaml
vim ${CONFIG}

# Add the following env vars to the configMapGenerator's literals
# for kfserving-models-web-app-config
# for kserve-models-web-app-config
- APP_PREFIX=/
- APP_DISABLE_AUTH="True"
- APP_SECURE_COOKIES="False"
Expand Down Expand Up @@ -83,7 +83,7 @@ cd dist/kubeflow
npm link

# run the app frontend
cd $KFSERVING_REPO/web-app/frontend
cd $KSERVE_MODELS_WEB_APP_REPO/frontend
npm i
npm link kubeflow
npm run build:watch
Expand All @@ -95,7 +95,7 @@ npm run build:watch
```bash
# create a virtual env and install deps
# https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
cd $KFSERVING_REPO/web-app/backend
cd $KSERVE_MODELS_WEB_APP_REPO/backend
python3.7 -m pip install --user virtualenv
python3.7 -m venv web-apps-dev
source web-apps-dev/bin/activate
Expand Down
4 changes: 2 additions & 2 deletions config/base/istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
namespace: kserve
spec:
gateways:
- $(ingressGateway)
- knative-serving/knative-ingress-gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /kserve-endpoints/
prefix: /models/
rewrite:
uri: /
route:
Expand Down
4 changes: 4 additions & 0 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ resources:
- service.yaml
- deployment.yaml
- istio.yaml

namespace: kserve

commonLabels:
kustomize.component: kserve-models-web-app
app.kubernetes.io/component: kserve-models-web-app

images:
- name: kserve/models-web-app
newName: kserve/models-web-app
Expand Down
4 changes: 4 additions & 0 deletions config/overlays/kubeflow/patches/web-app-vsvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
host: kserve-models-web-app.kubeflow.svc.cluster.local
port:
number: 80
- op: replace
path: /spec/gateways
value:
- kubeflow/kubeflow-gateway

0 comments on commit b1a1475

Please sign in to comment.