|
| 1 | +name: xKS E2E Tests (KinD odh-xks) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [master, release*] |
| 6 | + paths: |
| 7 | + - "pkg/apis/**" |
| 8 | + - "pkg/controller/**" |
| 9 | + - "config/**" |
| 10 | + - "test/e2e/llmisvc/**" |
| 11 | + - "!.github/**" |
| 12 | + - "!docs/**" |
| 13 | + - "!**.md" |
| 14 | + - ".github/workflows/e2e-test-odh-xks-kind.yml" |
| 15 | + workflow_dispatch: |
| 16 | + |
| 17 | +concurrency: |
| 18 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 19 | + cancel-in-progress: true |
| 20 | + |
| 21 | +jobs: |
| 22 | + test-odh-xks-kind: |
| 23 | + runs-on: ubuntu-22.04 |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + istio-version: ["1.27.5", "1.28.3"] |
| 28 | + name: test-odh-xks-kind (istio-${{ matrix.istio-version }}) |
| 29 | + steps: |
| 30 | + - name: Checkout source |
| 31 | + uses: actions/checkout@v4 |
| 32 | + with: |
| 33 | + fetch-depth: 0 |
| 34 | + |
| 35 | + - name: Merge target branch |
| 36 | + run: | |
| 37 | + git fetch origin ${{ github.base_ref }} |
| 38 | + git merge origin/${{ github.base_ref }} --no-edit |
| 39 | +
|
| 40 | + - name: Free-up disk space |
| 41 | + uses: ./.github/actions/free-up-disk-space |
| 42 | + |
| 43 | + - name: Setup Go |
| 44 | + uses: actions/setup-go@v5 |
| 45 | + with: |
| 46 | + go-version-file: go.mod |
| 47 | + |
| 48 | + - name: Setup Python |
| 49 | + uses: actions/setup-python@v5 |
| 50 | + with: |
| 51 | + python-version: "3.12" |
| 52 | + |
| 53 | + - name: Install KinD |
| 54 | + run: | |
| 55 | + curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64 |
| 56 | + chmod +x ./kind |
| 57 | + sudo mv ./kind /usr/local/bin/kind |
| 58 | + kind version |
| 59 | +
|
| 60 | + - name: Install kubectl |
| 61 | + run: | |
| 62 | + curl -LO "https://dl.k8s.io/release/v1.32.0/bin/linux/amd64/kubectl" |
| 63 | + chmod +x ./kubectl |
| 64 | + sudo mv ./kubectl /usr/local/bin/kubectl |
| 65 | + kubectl version --client |
| 66 | +
|
| 67 | + - name: Install kustomize |
| 68 | + run: | |
| 69 | + curl -LO "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.7.1/kustomize_v5.7.1_linux_amd64.tar.gz" |
| 70 | + tar xzf kustomize_v5.7.1_linux_amd64.tar.gz |
| 71 | + chmod +x kustomize |
| 72 | + sudo mv kustomize /usr/local/bin/ |
| 73 | + kustomize version |
| 74 | +
|
| 75 | + - name: Install cloud-provider-kind |
| 76 | + run: | |
| 77 | + go install sigs.k8s.io/cloud-provider-kind@latest |
| 78 | + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH |
| 79 | +
|
| 80 | + - name: Start cloud-provider-kind |
| 81 | + run: | |
| 82 | + # Start in background before cluster creation |
| 83 | + nohup cloud-provider-kind > /tmp/cloud-provider-kind.log 2>&1 & |
| 84 | + echo "cloud-provider-kind started in background (PID: $!)" |
| 85 | +
|
| 86 | + - name: Run setup-odh-xks.sh |
| 87 | + env: |
| 88 | + ISTIO_VERSION: ${{ matrix.istio-version }} |
| 89 | + run: | |
| 90 | + # Script creates KinD cluster, installs deps, builds & loads controller, deploys overlay |
| 91 | + ./test/scripts/kind/setup-odh-xks.sh |
| 92 | +
|
| 93 | + - name: Install UV |
| 94 | + run: ./test/scripts/gh-actions/setup-uv.sh |
| 95 | + |
| 96 | + - name: Install Python SDK |
| 97 | + run: | |
| 98 | + pushd python/kserve |
| 99 | + uv sync --group test |
| 100 | + popd |
| 101 | +
|
| 102 | + - name: Run E2E tests |
| 103 | + timeout-minutes: 40 |
| 104 | + env: |
| 105 | + SKIP_DELETION_ON_FAILURE: "true" |
| 106 | + TOKEN_AUDIENCES: "https://kubernetes.default.svc" |
| 107 | + GATEWAY_CLASS_NAME: "istio" |
| 108 | + run: | |
| 109 | + ./test/scripts/gh-actions/run-e2e-tests.sh "llminferenceservice and cluster_cpu and not auth and not custom_gateway" 1 "istio-gatewayapi-ext" |
| 110 | +
|
| 111 | + - name: Check system status |
| 112 | + if: always() |
| 113 | + run: | |
| 114 | + ./test/scripts/gh-actions/status-check.sh |
| 115 | +
|
| 116 | + - name: Collect logs on failure |
| 117 | + if: failure() |
| 118 | + run: | |
| 119 | + echo "=== LLMISVC Controller logs ===" |
| 120 | + kubectl logs -n opendatahub -l control-plane=llmisvc-controller-manager --tail=500 2>/dev/null || echo "No controller logs" |
| 121 | + echo "" |
| 122 | + echo "=== Istio logs ===" |
| 123 | + kubectl logs -n istio-system -l app=istiod --tail=200 2>/dev/null || echo "No istiod logs" |
| 124 | + echo "" |
| 125 | + echo "=== Gateway pod logs ===" |
| 126 | + kubectl logs -n opendatahub -l gateway.networking.k8s.io/gateway-name=inference-gateway --tail=200 2>/dev/null || echo "No gateway logs" |
| 127 | + echo "" |
| 128 | + echo "=== cloud-provider-kind logs ===" |
| 129 | + cat /tmp/cloud-provider-kind.log 2>/dev/null || echo "No cloud-provider-kind logs" |
0 commit comments