Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synced kserve upstream master branch into odh kserve master branch. #476

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b836fc8
Remove redundant namespace yaml (#4148)
greenmoon55 Dec 23, 2024
cb38637
Fix Localmodel agent build (#4150)
greenmoon55 Dec 23, 2024
41a1fd7
Fix model server fails to gracefully shutdown (#4116)
sivanantha321 Dec 24, 2024
07edb56
Ensure root model directory exists and add protection for jobs create…
yuzisun Dec 24, 2024
61b0746
Enable transformer deeper readiness check tests (#4121)
sivanantha321 Dec 26, 2024
5e5bff8
Update HuggingFace server dependencies versions (#4147)
AyushSawant18588 Dec 26, 2024
874a4a4
Add workflow for verifying go mod (#4137)
sivanantha321 Dec 26, 2024
ff13ef8
Fix for CVE-2024-52304 - aiohttp upgrade (#4113)
andyi2it Dec 27, 2024
7bec6fb
Allow other engine builders other than docker (#3906)
spolti Dec 30, 2024
8f79c44
Add localmodelnode crd to helm chart (#4161)
greenmoon55 Jan 2, 2025
5b718bc
Fixes Non-linear parsing of case-insensitive content (#4158)
spolti Jan 3, 2025
3e842b8
Helm chart - option to run daemonset as root (#4164)
greenmoon55 Jan 3, 2025
7b2681f
Replace nodeGroup with nodeGroups in charts/kserve-crd (#4166)
ritzdevp Jan 5, 2025
3597fa7
Add affinity and tolerations to localmodel daemonset (#4173)
greenmoon55 Jan 7, 2025
cb8a657
Fix s3 download PermanentRedirectError for legacy s3 endpoint (#4157)
bentohset Jan 8, 2025
654d314
Make label and annotation propagation configurable (#4030)
spolti Jan 8, 2025
b7155b3
Add ModelCache e2e test (#4136)
sivanantha321 Jan 11, 2025
717c6ae
Update vllm to 0.6.6 (#4176)
rajatvig Jan 12, 2025
1b64da9
[bugfix] fix s3 storage download filename bug (#4162)
anencore94 Jan 13, 2025
8a32b6f
Add hf to storageuri prefix list (#4184)
tjandy98 Jan 16, 2025
990e412
Add Support for OpenAI-compatible Embeddings API (#4129)
FabianScheidt Jan 16, 2025
d377350
fix: typo in _construct_http_status_error method (#4190)
Mgla96 Jan 16, 2025
a1ad62b
Fix raw logger e2e test (#4185)
sivanantha321 Jan 19, 2025
b164ea0
Feat: Support configuring isvc resource defaults (#4032)
andyi2it Jan 21, 2025
6653b89
keep replicas when autoscaler set external (#4196)
Jooho Jan 22, 2025
6f842d6
Increase kserve controller readiness probe time period (#4200)
sivanantha321 Jan 22, 2025
1d0afe1
Fix golangci-lint binary path selection based on GOBIN (#4198)
Jooho Jan 22, 2025
96f43de
Add option to disable volume management in localModel config (#4186)
ritzdevp Jan 22, 2025
ea1f055
set MaxUnavailable(0%)/MaxSurge(100%) for rollingUpdate in multinode …
Jooho Jan 24, 2025
549ab62
Gracefully shutdown the router server (#3367)
sivanantha321 Jan 25, 2025
5aedc95
Add workflow for manual huggingface vLLM image publish (#4092)
sivanantha321 Jan 25, 2025
7f4cad9
Gateway API Migration - Raw Deployment (#3952)
sivanantha321 Jan 25, 2025
b80c906
add make goal to build huggingface cpu image (#4202)
spolti Jan 26, 2025
c7b6ad0
Cleanup the filepath in createNewFile to avoid path traversal issue (…
hdefazio Jan 26, 2025
4c940e1
Enhance multinode health_check python and manifests (#4197)
Jooho Jan 26, 2025
41a0904
Publish 0.15-rc0 release (#4213)
yuzisun Jan 27, 2025
bb9c9d8
Merge kserve upstream master branch into odh kserve master branch.
mholder6 Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/actions/kserve-dep-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@ runs:
run: |
shopt -s nocasematch

if [[ "${{ inputs.network-layer }}" == "istio" ]]; then
echo "Selected network layer ${{ inputs.network-layer }}"
./test/scripts/gh-actions/setup-deps.sh ${{ inputs.deployment-mode }}

kubectl get pods -n istio-system
kubectl describe svc -n istio-system istio-ingressgateway
elif [[ "${{ inputs.network-layer }}" == "kourier" ]]; then
echo "Selected network layer ${{ inputs.network-layer }}"
./test/scripts/gh-actions/setup-kourier.sh
if [[ "${{ inputs.network-layer }}" == "kourier" ]]; then
echo "Selected network layer ${{ inputs.network-layer }}"
./test/scripts/gh-actions/setup-kourier.sh
else
echo "Unsupported network layer"
echo "Selected network layer ${{ inputs.network-layer }}"
./test/scripts/gh-actions/setup-deps.sh ${{ inputs.deployment-mode }} "${{ inputs.network-layer }}"
fi

kubectl get pods -n knative-serving
kubectl get pods -n cert-manager

- name: Update test overlays
shell: bash
run: |
Expand Down
24 changes: 20 additions & 4 deletions .github/actions/minikube-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
name: 'Minikube setup action'
description: 'Sets up minikube on the github runner'

inputs:
nodes:
description: 'Number of nodes to start minikube with'
required: false
default: '1'
driver:
description: 'Driver to use for minikube'
required: false
default: 'none'
start-args:
description: 'Additional arguments to pass to minikube start'
required: false
default: ''

runs:
using: "composite"
steps:
- name: Install kubectl
uses: azure/[email protected]
with:
version: 'v1.29.7'
version: 'v1.30.7'

- name: Setup Minikube
uses: medyagh/setup-minikube@latest
with:
minikube-version: '1.33.1'
kubernetes-version: 'v1.29.7'
driver: 'none'
kubernetes-version: 'v1.30.7'
driver: ${{ inputs.driver }}
wait: 'all'
start-args: --wait-timeout=6m0s
cpus: 'max'
memory: 'max'
start-args: --wait-timeout=6m0s --nodes=${{ inputs.nodes }} ${{ inputs.start-args }}

- name: Check Kubernetes pods
shell: bash
Expand Down
177 changes: 168 additions & 9 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
# Controller images
CONTROLLER_IMG: "kserve-controller"
LOCALMODEL_CONTROLLER_IMG: "kserve-localmodel-controller"
LOCALMODEL_AGENT_IMG: "kserve-localmodelnode-agent"
STORAGE_INIT_IMG: "storage-initializer"
AGENT_IMG: "agent"
ROUTER_IMG: "router"
Expand Down Expand Up @@ -87,6 +88,14 @@ jobs:
compression-level: 0
if-no-files-found: error

- name: Upload localmodel agent image
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.LOCALMODEL_AGENT_IMG }}-${{ github.sha }}
path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.LOCALMODEL_AGENT_IMG }}-${{ github.sha }}
compression-level: 0
if-no-files-found: error

- name: Upload agent image
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -589,7 +598,7 @@ jobs:

- name: Patch inferenceservice config
run: |
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-ingress.yaml
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-path-template.yaml
kubectl describe configmaps -n kserve inferenceservice-config

- name: Run E2E tests with path-based routing
Expand Down Expand Up @@ -720,8 +729,13 @@ jobs:

test-raw:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Test with Ingress and Gateway API
network-layer: ["istio-ingress", "envoy-gatewayapi", "istio-gatewayapi"]
needs:
[kserve-image-build, predictor-runtime-build]
[kserve-image-build, predictor-runtime-build, explainer-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand All @@ -733,6 +747,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -745,6 +760,7 @@ jobs:
uses: ./.github/actions/kserve-dep-setup
with:
deployment-mode: "raw"
network-layer: ${{ matrix.network-layer }}

- name: Download base images
uses: ./.github/actions/base-download
Expand All @@ -767,11 +783,12 @@ jobs:
name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.CUSTOM_MODEL_GRPC_IMG }}-${{ github.sha }}
path: ./tmp

- name: Download transformer image
- name: Download transformer and explainer artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.TRANSFORMER_ARTIFACT_PREFIX }}-${{ env.IMAGE_TRANSFORMER_IMG }}-${{ github.sha }}
path: ./tmp
pattern: +(${{ env.TRANSFORMER_ARTIFACT_PREFIX }}|${{ env.EXPLAINER_ARTIFACT_PREFIX }})-*
merge-multiple: true

- name: Load docker images
uses: ./.github/actions/load-docker-images
Expand All @@ -783,7 +800,7 @@ jobs:

- name: Install KServe
run: |
./test/scripts/gh-actions/setup-kserve.sh "raw"
./test/scripts/gh-actions/setup-kserve.sh "raw" ${{ matrix.network-layer }}

kubectl get pods -n kserve
kubectl describe pods -n kserve
Expand All @@ -792,10 +809,27 @@ jobs:
run: |
kubectl describe configmaps -n kserve inferenceservice-config

- name: Enable Gateway API
if: matrix.network-layer == 'envoy-gatewayapi' || matrix.network-layer == 'istio-gatewayapi'
run: |
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-enable-gateway-api.yaml

- name: Run E2E tests
timeout-minutes: 30
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "raw" "6"
./test/scripts/gh-actions/run-e2e-tests.sh "raw" "6" ${{ matrix.network-layer }}

- name: Patch inferenceservice config for path based routing
if: matrix.network-layer == 'envoy-gatewayapi' || matrix.network-layer == 'istio-gatewayapi'
run: |
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-path-template.yaml
kubectl describe configmaps -n kserve inferenceservice-config

- name: Run E2E tests with path based routing
if: matrix.network-layer == 'envoy-gatewayapi' || matrix.network-layer == 'istio-gatewayapi'
timeout-minutes: 30
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "raw" "6" ${{ matrix.network-layer }}

- name: Patch inferenceservice config for cluster ip none
run: |
Expand All @@ -805,7 +839,7 @@ jobs:
- name: Run E2E tests - cluster ip none
timeout-minutes: 30
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "rawcipn" "1"
./test/scripts/gh-actions/run-e2e-tests.sh "rawcipn" "1" ${{ matrix.network-layer }}

- name: Check system status
if: always()
Expand Down Expand Up @@ -900,7 +934,7 @@ jobs:
test-llm:
runs-on: ubuntu-22.04
needs:
[ kserve-image-build, predictor-runtime-build]
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -960,7 +994,7 @@ jobs:
test-huggingface-server-vllm:
runs-on: ubuntu-22.04
needs:
[ kserve-image-build, predictor-runtime-build]
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -1015,4 +1049,129 @@ jobs:
- name: Check system status
if: always()
run: |
./test/scripts/gh-actions/status-check.sh

test-modelcache:
runs-on: ubuntu-22.04
needs:
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Create tmp-images directory
run: |
sudo mkdir -p /tmp-images
sudo chown -R $USER /tmp-images

- name: Setup Minikube
uses: ./.github/actions/minikube-setup
with:
nodes: 3
driver: "docker"
start-args: "--mount --mount-string=/tmp-images:/tmp-images"

- name: Create minikube tunnel
run: |
nohup minikube tunnel > minikube-tunnel.log 2>&1 &

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

- name: Download base images
uses: actions/download-artifact@v4
with:
path: /tmp-images
pattern: ${{ env.BASE_ARTIFACT_PREFIX }}-*
merge-multiple: true

- name: Load base docker images
run: |
ls -l /tmp-images
minikube ssh -n minikube -- ls -l /tmp-images
files=$(find /tmp-images -maxdepth 1 -type f)
for file in ${files[@]};do
echo "Loading image $(basename ${file})"
minikube ssh -n minikube -- docker image load -i ${file}
minikube ssh -n minikube-m02 -- docker image load -i ${file}
minikube ssh -n minikube-m03 -- docker image load -i ${file}
done
sudo rm -rf /tmp-images/*
minikube ssh -n minikube -- docker image ls
minikube ssh -n minikube-m02 -- docker image ls
minikube ssh -n minikube-m03 -- docker image ls

- name: Download huggingface server image
uses: actions/download-artifact@v4
with:
name: ${{ env.HUGGINGFACE_IMG }}-${{ github.sha }}
path: /tmp-images

- name: Load runtime docker images
run: |
files=$(find /tmp-images -maxdepth 1 -type f)
for file in ${files[@]};do
echo "Loading image $(basename ${file})"
minikube ssh -n minikube-m02 -- docker image load -i ${file}
done
sudo rm -rf tmp-images/*
minikube ssh -n minikube-m02 -- docker image ls

- name: Create model root directory
run: |
minikube ssh -n minikube-m02 -- sudo mkdir -p -m=777 /models
minikube ssh -n minikube-m03 -- sudo mkdir -p -m=777 /models

- 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: Enable modelcache
run: |
sed -i -e "s/latest/${GITHUB_SHA}/g" config/overlays/test/configmap/inferenceservice-enable-modelcache.yaml
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-enable-modelcache.yaml
kubectl describe configmaps -n kserve inferenceservice-config

- name: Create localmodel job namespace
run: |
kubectl create ns kserve-localmodel-jobs

- name: Label worker nodes for modelcache
run: |
kubectl label nodes -l '!node-role.kubernetes.io/control-plane' kserve/localmodel=worker

- name: Enable nodeselector in knative
run: |
kubectl patch configmaps -n knative-serving config-features --patch '{"data": {"kubernetes.podspec-nodeselector": "enabled"}}'

- name: Run E2E tests
timeout-minutes: 15
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "modelcache" "1"

- name: Check system status
if: always()
run: |
echo "::group::Minikube tunnel logs"
cat minikube-tunnel.log
echo "::endgroup::"
./test/scripts/gh-actions/status-check.sh
38 changes: 37 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,47 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56
args: --out-format=line-number

verify-go-mod:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: false

- name: Run go mod tidy
run: |
go mod tidy

- name: Verify
shell: bash
run: |
# From: https://backreference.org/2009/12/23/how-to-match-newlines-in-sed/
# This is to leverage this workaround:
# https://github.com/actions/toolkit/issues/193#issuecomment-605394935
urlencode() {
sed ':begin;$!N;s/\n/%0A/;tbegin'
}

if [ -z "$(git status --porcelain)" ]; then
echo "${{ github.repository }} up to date."
else
echo "Found diffs in: $(git diff-index --name-only HEAD)"
for x in $(git diff-index --name-only HEAD); do
echo "::error file=$x::Please run 'go mod tidy'.%0A$(git diff $x | urlencode)"
done
echo "${{ github.repository }} is out of date. Please run 'go mod tidy'"
exit 1
fi
Loading
Loading