-
Notifications
You must be signed in to change notification settings - Fork 11
Sync upstream to odh march 18 #143
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
base: main
Are you sure you want to change the base?
Changes from all commits
a0c8d17
1519a28
ed55c9c
1dae683
f278bfe
9fe0948
416d4a0
8437ae1
f21dcac
dbb0b5d
70a3fd0
db7a7ba
0ccf2ed
9903474
a4f9d45
c34ad8f
c910eeb
091312c
da0d089
927052d
bd3ba8c
3ce43fe
12c2dd7
7675f18
f5a626e
8112a3a
9083ec0
0f30fa6
700325d
be97ee1
3e62967
e0f7b8d
d1a19ef
2078503
fb7e3af
b9a4a82
2d38fc1
e8e709d
89cbbbb
37fac64
63914ae
a238100
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,17 @@ | ||
| name: Trivy Scan | ||
| description: Scan container image with Trivy | ||
| description: Scan container image with official Aqua Security Trivy action | ||
| inputs: | ||
| image: | ||
| required: true | ||
| description: "Image to scan (e.g., 'my-repo/my-image:latest')" | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Install Trivy | ||
| run: | | ||
| wget https://github.com/aquasecurity/trivy/releases/download/v0.44.1/trivy_0.44.1_Linux-64bit.deb | ||
| sudo dpkg -i trivy_0.44.1_Linux-64bit.deb | ||
| shell: bash | ||
|
|
||
|
|
||
| - name: Scan image | ||
| run: | | ||
| trivy image --severity HIGH,CRITICAL --no-progress ${{ inputs.image }} | ||
| shell: bash | ||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@0.35.0 | ||
| with: | ||
| image-ref: ${{ inputs.image }} | ||
| format: 'table' | ||
| severity: 'HIGH,CRITICAL' | ||
| exit-code: '1' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,5 +13,5 @@ jobs: | |
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Check typos | ||
| uses: crate-ci/typos@v1.43.5 | ||
| uses: crate-ci/typos@v1.44.0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,62 @@ | ||||||||||||||||||||||
| name: Build and Push Container Images | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| on: | ||||||||||||||||||||||
| workflow_call: | ||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||
| epp-image-name: | ||||||||||||||||||||||
| required: true | ||||||||||||||||||||||
| type: string | ||||||||||||||||||||||
| sidecar-image-name: | ||||||||||||||||||||||
| required: true | ||||||||||||||||||||||
| type: string | ||||||||||||||||||||||
| tag: | ||||||||||||||||||||||
| required: true | ||||||||||||||||||||||
| type: string | ||||||||||||||||||||||
| prerelease: | ||||||||||||||||||||||
| required: true | ||||||||||||||||||||||
| type: string | ||||||||||||||||||||||
| secrets: | ||||||||||||||||||||||
| GHCR_TOKEN: | ||||||||||||||||||||||
| required: true | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||
| docker-build-and-push: | ||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||
|
Comment on lines
+22
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Add explicit permissions block with least-privilege scope. No Suggested fix jobs:
docker-build-and-push:
runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
steps:📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| steps: | ||||||||||||||||||||||
| - name: Free Disk Space (Ubuntu) | ||||||||||||||||||||||
| uses: jlumbroso/free-disk-space@main | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| tool-cache: false | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Checkout source | ||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Build and push EPP image | ||||||||||||||||||||||
| uses: ./.github/actions/docker-build-and-push | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| docker-file: Dockerfile.epp | ||||||||||||||||||||||
| tag: ${{ inputs.tag }} | ||||||||||||||||||||||
| image-name: ${{ inputs.epp-image-name }} | ||||||||||||||||||||||
| registry: ghcr.io/llm-d | ||||||||||||||||||||||
| github-token: ${{ secrets.GHCR_TOKEN }} | ||||||||||||||||||||||
| prerelease: ${{ inputs.prerelease }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Build and push sidecar image | ||||||||||||||||||||||
| uses: ./.github/actions/docker-build-and-push | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| docker-file: Dockerfile.sidecar | ||||||||||||||||||||||
| tag: ${{ inputs.tag }} | ||||||||||||||||||||||
| image-name: ${{ inputs.sidecar-image-name }} | ||||||||||||||||||||||
| registry: ghcr.io/llm-d | ||||||||||||||||||||||
| github-token: ${{ secrets.GHCR_TOKEN }} | ||||||||||||||||||||||
| prerelease: ${{ inputs.prerelease }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run Trivy scan on EPP image | ||||||||||||||||||||||
| uses: ./.github/actions/trivy-scan | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| image: ghcr.io/llm-d/${{ inputs.epp-image-name }}:${{ inputs.tag }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run Trivy scan on sidecar image | ||||||||||||||||||||||
| uses: ./.github/actions/trivy-scan | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| image: ghcr.io/llm-d/${{ inputs.sidecar-image-name }}:${{ inputs.tag }} | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: CI - Dev - Docker Container Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - 'release-*' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| set-params: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| project_name: ${{ steps.version.outputs.project_name }} | ||
| sidecar_name: ${{ steps.version.outputs.sidecar_name }} | ||
| tag: ${{ steps.tag.outputs.tag }} | ||
| steps: | ||
| - name: Set image names | ||
| id: version | ||
| run: | | ||
| repo="${GITHUB_REPOSITORY##*/}" | ||
| echo "project_name=${repo}-dev" >> "$GITHUB_OUTPUT" | ||
| echo "sidecar_name=llm-d-routing-sidecar-dev" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Set branch name as tag | ||
| id: tag | ||
| run: | | ||
| echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| build-and-push: | ||
| needs: set-params | ||
| uses: ./.github/workflows/ci-build-images.yaml | ||
| with: | ||
| epp-image-name: ${{ needs.set-params.outputs.project_name }} | ||
| sidecar-image-name: ${{ needs.set-params.outputs.sidecar_name }} | ||
| tag: ${{ needs.set-params.outputs.tag }} | ||
| prerelease: "true" | ||
| secrets: | ||
| GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ jobs: | |
| steps: | ||
| - name: Checkout source | ||
| uses: actions/checkout@v6 | ||
| - uses: dorny/paths-filter@v3 | ||
| - uses: dorny/paths-filter@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -path ".github/workflows/ci-pr-checks.yaml" -type fRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 66 🏁 Script executed: cat -n .github/workflows/ci-pr-checks.yaml | head -30Repository: opendatahub-io/llm-d-inference-scheduler Length of output: 870 🏁 Script executed: grep -n "uses:" .github/workflows/ci-pr-checks.yamlRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 331 Pin Line 19 uses tag pinning ( Remediation- - uses: dorny/paths-filter@v4
+ - uses: dorny/paths-filter@<full_commit_sha>🤖 Prompt for AI Agents |
||
| id: filter | ||
| with: | ||
| filters: | | ||
|
|
@@ -52,25 +52,15 @@ jobs: | |
| go-version: "${{ env.GO_VERSION }}" | ||
| cache-dependency-path: ./go.sum | ||
|
|
||
| - name: Configure CGO for ZMQ | ||
| run: | | ||
| echo "CGO_ENABLED=1" >> $GITHUB_ENV | ||
| echo "PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> $GITHUB_ENV | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| go mod tidy | ||
| sudo -E env "PATH=$PATH" make install-dependencies | ||
| run: go mod tidy | ||
|
|
||
| - name: Run lint checks | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| version: "v2.8.0" | ||
| args: "--config=./.golangci.yml" | ||
| skip-cache: true | ||
| env: | ||
| CGO_ENABLED: ${{ env.CGO_ENABLED }} | ||
| PKG_CONFIG_PATH: ${{ env.PKG_CONFIG_PATH }} | ||
|
|
||
| - name: Run make build | ||
| shell: bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,16 +8,20 @@ Documentation for developing the inference scheduler. | |||||
| - [Golang] `v1.24`+ | ||||||
| - [Docker] (or [Podman]) | ||||||
| - [Kubernetes in Docker (KIND)] | ||||||
| - [Kustomize] | ||||||
| - [ZeroMQ] | ||||||
| - [Kubectl] `v1.14`+ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: The official kubectl version skew policy relative to the Kubernetes API server is that kubectl is supported within one minor version older or newer than the kube-apiserver. For example, if the kube-apiserver is at v1.35, kubectl versions v1.34, v1.35, and v1.36 are supported. In highly-available clusters with version skew between kube-apiserver instances (e.g., v1.34 and v1.35), the supported kubectl versions are narrowed to those within one minor version of all apiservers (e.g., only v1.34 and v1.35). For clusters using Gateway API v1.3-era tooling, there is no specific minimum kubectl version beyond the general skew policy, as Gateway API is provided via CRDs (not built-in Kubernetes APIs) and works on Kubernetes v1.26+. Implementations like kgateway (conformant to v1.3) support Kubernetes v1.27+, so kubectl within one minor version of the cluster's API server (e.g., minimum matching the cluster version, such as v1.27 for a v1.27+ cluster) is appropriate. No sources indicate additional kubectl requirements for Gateway API v1.3. Citations:
🏁 Script executed: # Get file size first
wc -l DEVELOPMENT.mdRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 102 🏁 Script executed: # Read the relevant sections around lines 11 and 81
cat -n DEVELOPMENT.md | head -30Repository: opendatahub-io/llm-d-inference-scheduler Length of output: 1342 🏁 Script executed: # Also check around line 81
cat -n DEVELOPMENT.md | sed -n '75,95p'Repository: opendatahub-io/llm-d-inference-scheduler Length of output: 1017 🏁 Script executed: # Check for go.mod to see Kubernetes dependencies
head -50 go.modRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 2031 🏁 Script executed: # Check Makefile or other version indicators
grep -i "kubernetes\|kind\|kube" Makefile 2>/dev/null | head -20Repository: opendatahub-io/llm-d-inference-scheduler Length of output: 649 🏁 Script executed: # Look for any version constants or documentation about cluster versions
grep -r "kubernetes.*version\|kind.*version" . --include="*.md" --include="*.go" | head -10Repository: opendatahub-io/llm-d-inference-scheduler Length of output: 66 Update Line 11 specifies v1.14+, but the project depends on Kubernetes v1.35 (k8s.io/* v0.35.2). Per the official version-skew policy, kubectl must be within one minor version of kube-apiserver. For v1.35 clusters, only kubectl v1.34–v1.36 are supported. Setting v1.14+ will cause immediate setup failures. Additionally, line 81 uses 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| [Make]:https://www.gnu.org/software/make/ | ||||||
| [Golang]:https://go.dev/ | ||||||
| [Docker]:https://www.docker.com/ | ||||||
| [Podman]:https://podman.io/ | ||||||
| [Kubernetes in Docker (KIND)]:https://github.com/kubernetes-sigs/kind | ||||||
| [Kustomize]:https://kubectl.docs.kubernetes.io/installation/kustomize/ | ||||||
| [ZeroMQ]:https://zeromq.org/ | ||||||
| [Kubectl]:https://kubectl.docs.kubernetes.io/installation/kubectl/ | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > Before committing and pushing changes to an upstream repository, you may want to | ||||||
| > explicitly run the `make presubmit` target to avoid failing PR checks. The checks | ||||||
| > are also performed as part of a GitHub action, but running locally can save time | ||||||
| > and an iteration. | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > **Python is NOT required** as of v0.5.1. Tokenization is handled by a separate UDS (Unix Domain Socket) tokenizer sidecar container. Previous versions (< v0.5.1) used embedded Python tokenizers with daulet/tokenizers bindings, but these are now deprecated. | ||||||
|
|
@@ -59,30 +63,30 @@ There are several ways to access the gateway: | |||||
| **Port forward**: | ||||||
|
|
||||||
| ```bash | ||||||
| $ kubectl --context llm-d-inference-scheduler-dev port-forward service/inference-gateway 8080:80 | ||||||
| kubectl --context kind-llm-d-inference-scheduler-dev port-forward service/inference-gateway-istio 8080:80 | ||||||
| ``` | ||||||
|
|
||||||
| **NodePort** | ||||||
|
|
||||||
| ```bash | ||||||
| # Determine the k8s node address | ||||||
| $ kubectl --context llm-d-inference-scheduler-dev get node -o yaml | grep address | ||||||
| kubectl --context kind-llm-d-inference-scheduler-dev get node -o yaml | grep address | ||||||
| # The service is accessible over port 80 of the worker IP address. | ||||||
| ``` | ||||||
|
|
||||||
| **LoadBalancer** | ||||||
|
|
||||||
| ```bash | ||||||
| # Install and run cloud-provider-kind: | ||||||
| $ go install sigs.k8s.io/cloud-provider-kind@latest && cloud-provider-kind & | ||||||
| $ kubectl --context llm-d-inference-scheduler-dev get service inference-gateway | ||||||
| go install sigs.k8s.io/cloud-provider-kind@latest && cloud-provider-kind & | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: fd DEVELOPMENT.md -type fRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 254 🏁 Script executed: # Check the context around line 81 in DEVELOPMENT.md
if [ -f "DEVELOPMENT.md" ]; then
sed -n '70,90p' DEVELOPMENT.md
fiRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 876 🌐 Web query:
💡 Result: cloud-provider-kind is a Kubernetes SIGs project that provides a cloud provider implementation for KIND clusters, enabling LoadBalancer services, Ingress, and Gateway API support in local KIND environments. It fills the gap in KIND for testing cloud-provider dependent features like Load Balancers. GitHub: https://github.com/kubernetes-sigs/cloud-provider-kind (kubernetes-sigs/cloud-provider-kind) Go module: sigs.k8s.io/cloud-provider-kind Homepage/docs: https://kubernetes-sigs.github.io/cloud-provider-kind/ Latest stable release: v0.10.0 (released 2025-11-29). Changes include fixes for Ingress on Mac/Windows, mirror registry support, Gateway channel options, and improved logging. Recent pre-releases (not tagged as stable releases): - v0.10.1-0.20260302143654-b328f96e9b24 (2026-03-02) - v0.10.1-0.20260201214224-cddfafcbff87 (2026-02-01) Repo last push: 2026-03-15 (active development). Installation: go install sigs.k8s.io/cloud-provider-kind@latest Docker image (v0.4.0+): registry.k8s.io/cloud-provider-kind/cloud-controller-manager Usage example: 1. kind create cluster 2. Run cloud-provider-kind (may need sudo on macOS/WSL2) 3. Deploy LoadBalancer/Ingress/Gateway services for external access. Dependencies (v0.10.0): Kubernetes v0.34.2 libs, sigs.k8s.io/gateway-api v1.4.0, sigs.k8s.io/kind v0.30.0, Envoy v1.36.0. Not integrated into KIND CLI (separate issue Citations:
🏁 Script executed: grep -n "@latest\|@main\|@master" DEVELOPMENT.mdRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 161 🏁 Script executed: # Also check for other go install commands without version pinning
grep -n "go install" DEVELOPMENT.mdRepository: opendatahub-io/llm-d-inference-scheduler Length of output: 161 Replace Line 81 introduces non-deterministic behavior during contributor setup. Severity: Medium (CWE-494). A compromised future release would be silently executed by developers. Pin to a specific release (e.g., Remediation-go install sigs.k8s.io/cloud-provider-kind@latest && cloud-provider-kind &
+go install sigs.k8s.io/cloud-provider-kind@v0.10.0 && cloud-provider-kind &📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| kubectl --context kind-llm-d-inference-scheduler-dev get service inference-gateway-istio | ||||||
| # Wait for the LoadBalancer External-IP to become available. The service is accessible over port 80. | ||||||
| ``` | ||||||
|
|
||||||
| You can now make requests matching the IP:port of one of the access mode above: | ||||||
|
|
||||||
| ```bash | ||||||
| $ curl -s -w '\n' http://<IP:port>/v1/completions -H 'Content-Type: application/json' -d '{"model":"food-review","prompt":"hi","max_tokens":10,"temperature":0}' | jq | ||||||
| curl -s -w '\n' http://<IP:port>/v1/completions -H 'Content-Type: application/json' -d '{"model":"food-review","prompt":"hi","max_tokens":10,"temperature":0}' | jq | ||||||
| ``` | ||||||
|
|
||||||
| By default the created inference gateway, can be accessed on port 30080. This can | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/actions/docker-build-and-push/action.yml | head -50Repository: opendatahub-io/llm-d-inference-scheduler
Length of output: 1833
🏁 Script executed:
Repository: opendatahub-io/llm-d-inference-scheduler
Length of output: 135
🏁 Script executed:
cat -n .github/actions/docker-build-and-push/action.yml | tail -25Repository: opendatahub-io/llm-d-inference-scheduler
Length of output: 1171
Pin
docker/setup-buildx-actionto a full commit SHA.Line 30 uses mutable-tag pinning. Supply chain risk: a retagged or compromised action revision executes attacker-controlled code in the build pipeline and can exfiltrate registry credentials. (CWE-829, CWE-494)
Remediation
🤖 Prompt for AI Agents