Skip to content

Commit

Permalink
Merge pull request #83 from israel-hdez/upstream-master-sync
Browse files Browse the repository at this point in the history
Upstream master sync
  • Loading branch information
openshift-merge-robot authored Sep 20, 2023
2 parents 833f509 + 5e9ee84 commit b6eac44
Show file tree
Hide file tree
Showing 141 changed files with 9,818 additions and 1,128 deletions.
5 changes: 5 additions & 0 deletions .github/actions/base-download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ runs:
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/storage-initializer:${{ github.sha }}"

- name: Download router image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/router:${{ github.sha }}"
148 changes: 142 additions & 6 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
with:
image: "kserve/storage-initializer:${{ github.sha }}"

- name: Upload router image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/router:${{ github.sha }}"

poetry-check:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -110,7 +115,7 @@ jobs:
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/custom-image-transformer-grpc:${{ github.sha }}"

explainer-runtime-build:
runs-on: ubuntu-latest
needs: [poetry-check]
Expand All @@ -133,9 +138,33 @@ jobs:
with:
image: "kserve/art-explainer:${{ github.sha }}"

graph-tests-images-build:
runs-on: ubuntu-latest
needs: [ poetry-check ]
steps:
- uses: actions/checkout@v3

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Build test images needed for graph tests
run: |
./test/scripts/gh-actions/build-graph-tests-images.sh
docker image ls
- name: Upload success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Upload error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

test-fast:
runs-on: ubuntu-latest
needs: [kserve-image-build, predictor-runtime-build, explainer-runtime-build]
needs: [kserve-image-build, predictor-runtime-build, explainer-runtime-build, graph-tests-images-build]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -187,6 +216,16 @@ jobs:
with:
image: "kserve/image-transformer:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

Expand All @@ -197,13 +236,100 @@ jobs:
kubectl get pods -n kserve
kubectl describe pods -n kserve
- name: Run E2E tests
- name: Run all E2E tests except graph
timeout-minutes: 60
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "fast or pmml or graph"
./test/scripts/gh-actions/run-e2e-tests.sh "fast or pmml"
kubectl get pods -n kserve
- name: Run E2E tests for graph
timeout-minutes: 120
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "graph" "2"
kubectl get pods -n kserve
- name: Check system status
if: always()
run: |
./test/scripts/gh-actions/status-check.sh
test-path-based-routing:
runs-on: ubuntu-latest
needs: [ kserve-image-build, predictor-runtime-build, explainer-runtime-build, graph-tests-images-build ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Minikube
uses: ./.github/actions/minikube-setup

- name: Download base images
uses: ./.github/actions/base-download

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup

- name: Download sklearn server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/sklearnserver:${{ github.sha }}"

- name: Download xgb server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/xgbserver:${{ github.sha }}"

- name: Download lgb server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/lgbserver:${{ github.sha }}"

- name: Download pmml image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/pmmlserver:${{ github.sha }}"

- name: Download transformer image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/image-transformer:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

- name: Install KServe
run: |
./test/scripts/gh-actions/setup-kserve.sh
kubectl get pods -n kserve
kubectl describe pods -n kserve
- name: Patch inferenceservice config
run : |
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-ingress.yaml
Expand Down Expand Up @@ -587,7 +713,7 @@ jobs:
test-kourier:
runs-on: ubuntu-latest
needs: [kserve-image-build, predictor-runtime-build]
needs: [kserve-image-build, predictor-runtime-build, graph-tests-images-build]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -614,6 +740,16 @@ jobs:
with:
image: "kserve/xgbserver:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

Expand All @@ -630,7 +766,7 @@ jobs:
kubectl describe configmaps -n kserve inferenceservice-config
- name: Run E2E tests
timeout-minutes: 25
timeout-minutes: 120
run: |
export KSERVE_INGRESS_HOST_PORT=$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
--output=jsonpath="{.items[0].status.podIP}"):$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
Expand Down
26 changes: 18 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CRD_OPTIONS ?= "crd:maxDescLen=0"
KSERVE_ENABLE_SELF_SIGNED_CA ?= false
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26
SUCCESS_200_ISVC_IMG ?= success-200-isvc
ERROR_404_ISVC_IMG ?= error-404-isvc

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
Expand Down Expand Up @@ -76,6 +78,9 @@ deploy: manifests
${KUSTOMIZE} edit remove resource certmanager/certificate.yaml; \
else ${KUSTOMIZE} edit add resource certmanager/certificate.yaml; fi;
${KUSTOMIZE} build config/default | kubectl apply -f -
kubectl wait --for=condition=ready pod -l control-plane=kserve-controller-manager -n kserve --timeout=300s
sleep 2
${KUSTOMIZE} build config/runtimes | kubectl apply -f -
if [ ${KSERVE_ENABLE_SELF_SIGNED_CA} != false ]; then ./hack/self-signed-ca.sh; fi;

deploy-dev: manifests
Expand All @@ -87,6 +92,7 @@ deploy-dev: manifests
${KUSTOMIZE} build config/overlays/development | kubectl apply -f -
# TODO: Add runtimes as part of default deployment
kubectl wait --for=condition=ready pod -l control-plane=kserve-controller-manager -n kserve --timeout=300s
sleep 2
${KUSTOMIZE} build config/runtimes | kubectl apply -f -
if [ ${KSERVE_ENABLE_SELF_SIGNED_CA} != false ]; then ./hack/self-signed-ca.sh; fi;

Expand Down Expand Up @@ -125,17 +131,9 @@ deploy-helm: manifests

undeploy: kustomize
${KUSTOMIZE} build config/default | kubectl delete -f -
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io inferenceservice.serving.kserve.io
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io trainedmodel.serving.kserve.io
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io inferencegraph.serving.kserve.io
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io inferenceservice.serving.kserve.io

undeploy-dev: kustomize
${KUSTOMIZE} build config/overlays/development | kubectl delete -f -
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io inferenceservice.serving.kserve.io
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io trainedmodel.serving.kserve.io
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io inferencegraph.serving.kserve.io
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io inferenceservice.serving.kserve.io

# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen kustomize
Expand Down Expand Up @@ -302,6 +300,18 @@ docker-build-qpext:
docker-build-push-qpext: docker-build-qpext
docker push ${KO_DOCKER_REPO}/${QPEXT_IMG}

docker-build-success-200-isvc:
cd python && docker buildx build -t ${KO_DOCKER_REPO}/${SUCCESS_200_ISVC_IMG} -f success_200_isvc.Dockerfile .

docker-push-success-200-isvc: docker-build-success-200-isvc
docker push ${KO_DOCKER_REPO}/${SUCCESS_200_ISVC_IMG}

docker-build-error-node-404:
cd python && docker buildx build -t ${KO_DOCKER_REPO}/${ERROR_404_ISVC_IMG} -f error_404_isvc.Dockerfile .

docker-push-error-node-404: docker-build-error-node-404
docker push ${KO_DOCKER_REPO}/${ERROR_404_ISVC_IMG}

test-qpext:
cd qpext && go test -v ./... -cover

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,10 @@ spec:
type: boolean
name:
type: string
priority:
format: int32
minimum: 1
type: integer
version:
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,10 @@ spec:
type: boolean
name:
type: string
priority:
format: int32
minimum: 1
type: integer
version:
type: string
required:
Expand Down
Loading

0 comments on commit b6eac44

Please sign in to comment.