Skip to content

Commit 5034c5f

Browse files
authored
Merge pull request opendatahub-io#1 from zdtsw-forking/odh
update: sync upstream llm-d changes and add adaption for opendatahub
2 parents c6ac5e5 + 9db64a3 commit 5034c5f

File tree

16 files changed

+347
-83
lines changed

16 files changed

+347
-83
lines changed

.github/actions/docker-build-and-push/action.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,52 @@ inputs:
1313
registry:
1414
required: true
1515
description: Container registry (e.g., ghcr.io/llm-d)
16+
context:
17+
required: false
18+
description: Build context path (defaults to repository root)
19+
default: '.'
20+
dockerfile:
21+
required: false
22+
description: Path to Dockerfile relative to context (defaults to Dockerfile in context)
23+
default: ''
1624
runs:
1725
using: "composite"
1826
steps:
1927
- name: Set up Docker Buildx
2028
uses: docker/setup-buildx-action@v3
2129

2230
- name: Login to GitHub Container Registry
23-
run: echo "${{ inputs.github-token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
31+
run: echo "${GITHUB_TOKEN}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
2432
shell: bash
33+
env:
34+
GITHUB_TOKEN: ${{ inputs.github-token }}
2535

2636
- name: Print image info
2737
run: |
28-
echo "Image name: ${{ inputs.image-name }}"
29-
echo "Tag: ${{ inputs.tag }}"
30-
echo "Registry: ${{ inputs.registry }}"
38+
echo "Image name: ${IMAGE_NAME}"
39+
echo "Tag: ${TAG}"
40+
echo "Registry: ${REGISTRY}"
3141
shell: bash
42+
env:
43+
IMAGE_NAME: ${{ inputs.image-name }}
44+
TAG: ${{ inputs.tag }}
45+
REGISTRY: ${{ inputs.registry }}
3246

3347
- name: Build image and push
3448
run: |
49+
DOCKERFILE_ARG=""
50+
if [ -n "${DOCKERFILE}" ]; then
51+
DOCKERFILE_ARG="-f ${DOCKERFILE}"
52+
fi
3553
docker buildx build \
3654
--platform linux/amd64 \
37-
-t ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }} \
38-
--push .
55+
${DOCKERFILE_ARG} \
56+
-t "${REGISTRY}/${IMAGE_NAME}:${TAG}" \
57+
--push "${CONTEXT}"
3958
shell: bash
59+
env:
60+
DOCKERFILE: ${{ inputs.dockerfile }}
61+
REGISTRY: ${{ inputs.registry }}
62+
IMAGE_NAME: ${{ inputs.image-name }}
63+
TAG: ${{ inputs.tag }}
64+
CONTEXT: ${{ inputs.context }}

.github/dependabot.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Dependabot configuration for llm-d-kv-cache
2+
# Based on canonical config from llm-d/llm-d-infra
3+
4+
version: 2
5+
updates:
6+
7+
# Go module updates
8+
- package-ecosystem: "gomod"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 10
13+
commit-message:
14+
prefix: "deps(go)"
15+
labels:
16+
- "dependencies"
17+
- "release-note-none"
18+
ignore:
19+
- dependency-name: "go"
20+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
21+
- dependency-name: "k8s.io/*"
22+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
23+
- dependency-name: "sigs.k8s.io/*"
24+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
25+
- dependency-name: "*"
26+
update-types: ["version-update:semver-major"]
27+
groups:
28+
kubernetes:
29+
patterns:
30+
- "k8s.io/*"
31+
- "sigs.k8s.io/*"
32+
go-dependencies:
33+
patterns:
34+
- "*"
35+
36+
# Go module updates (nested example module)
37+
- package-ecosystem: "gomod"
38+
directory: "/examples/kv_cache_aware_scorer"
39+
schedule:
40+
interval: "weekly"
41+
open-pull-requests-limit: 5
42+
commit-message:
43+
prefix: "deps(go)"
44+
labels:
45+
- "dependencies"
46+
- "release-note-none"
47+
ignore:
48+
- dependency-name: "*"
49+
update-types: ["version-update:semver-major"]
50+
groups:
51+
kubernetes:
52+
patterns:
53+
- "k8s.io/*"
54+
- "sigs.k8s.io/*"
55+
go-dependencies:
56+
patterns:
57+
- "*"
58+
59+
# GitHub Actions dependencies
60+
- package-ecosystem: "github-actions"
61+
directory: "/"
62+
schedule:
63+
interval: "weekly"
64+
labels:
65+
- "dependencies"
66+
- "release-note-none"
67+
commit-message:
68+
prefix: "deps(actions)"
69+
70+
# Docker base image updates
71+
- package-ecosystem: "docker"
72+
directory: "/"
73+
schedule:
74+
interval: "weekly"
75+
labels:
76+
- "dependencies"
77+
commit-message:
78+
prefix: "deps(docker)"
79+
80+
- package-ecosystem: "docker"
81+
directory: "/services/uds_tokenizer"
82+
schedule:
83+
interval: "weekly"
84+
labels:
85+
- "dependencies"
86+
commit-message:
87+
prefix: "deps(docker)"

.github/workflows/check-typos.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Check Typos
2+
on:
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
typos:
8+
uses: llm-d/llm-d-infra/.github/workflows/reusable-typos.yml@main
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI - Build UDS Tokenizer Image
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
docker-build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v6
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Login to GitHub Container Registry
22+
if: github.event_name == 'push'
23+
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
24+
shell: bash
25+
26+
- name: Determine image tag
27+
id: tag
28+
run: |
29+
if [[ "${{ github.event_name }}" == "push" ]]; then
30+
SHA="${{ github.sha }}"
31+
SHORT_SHA="${SHA:0:7}"
32+
echo "tag=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
33+
echo "image=ghcr.io/${{ github.repository_owner }}/llm-d-uds-tokenizer:${SHORT_SHA}" >> "$GITHUB_OUTPUT"
34+
else
35+
echo "tag=pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
36+
echo "image=llm-d-uds-tokenizer:pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
37+
fi
38+
shell: bash
39+
40+
- name: Build UDS tokenizer image
41+
run: |
42+
PUSH_ARG=""
43+
if [[ "${{ github.event_name }}" == "push" ]]; then
44+
PUSH_ARG="--push"
45+
fi
46+
docker buildx build \
47+
--platform linux/amd64 \
48+
-t ${{ steps.tag.outputs.image }} \
49+
${PUSH_ARG} \
50+
-f services/uds_tokenizer/Dockerfile \
51+
services/uds_tokenizer
52+
shell: bash
53+
54+
- name: Run Trivy scan
55+
if: github.event_name == 'push'
56+
uses: ./.github/actions/trivy-scan
57+
with:
58+
image: ${{ steps.tag.outputs.image }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Check Signed Commits
2+
on: pull_request_target
3+
4+
jobs:
5+
signed-commits:
6+
uses: llm-d/llm-d-infra/.github/workflows/reusable-signed-commits.yml@main
7+
permissions:
8+
contents: read
9+
pull-requests: write
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Markdown Link Check
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
jobs:
10+
links:
11+
uses: llm-d/llm-d-infra/.github/workflows/reusable-md-link-check.yml@main
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Non-Main Gatekeeper
2+
on:
3+
pull_request:
4+
types: [opened, edited, synchronize, reopened]
5+
6+
jobs:
7+
gatekeeper:
8+
uses: llm-d/llm-d-infra/.github/workflows/reusable-non-main-gatekeeper.yml@main

.github/workflows/prow-github.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,12 @@
1-
# Run specified actions or jobs for issue and PR comments
2-
3-
name: "Prow github actions"
1+
name: Prow Commands
42
on:
53
issue_comment:
64
types: [created]
75

8-
# Grant additional permissions to the GITHUB_TOKEN
96
permissions:
10-
# Allow labeling issues
117
issues: write
12-
# Allow adding a review to a pull request
138
pull-requests: write
149

1510
jobs:
16-
prow-execute:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: jpmcb/prow-github-actions@v2.0.0
20-
with:
21-
github-token: "${{ secrets.GITHUB_TOKEN }}"
22-
prow-commands: "/assign
23-
/unassign
24-
/approve
25-
/retitle
26-
/area
27-
/kind
28-
/priority
29-
/remove
30-
/lgtm
31-
/close
32-
/reopen
33-
/lock
34-
/milestone
35-
/hold
36-
/cc
37-
/uncc"
11+
prow:
12+
uses: llm-d/llm-d-infra/.github/workflows/reusable-prow-commands.yml@main
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
# This Github workflow will check every hour for PRs with the lgtm label and will attempt to automatically merge them.
2-
# If the hold label is present, it will block automatic merging.
3-
4-
name: "Prow merge on lgtm label"
1+
name: Prow Auto-merge
52
on:
63
schedule:
7-
- cron: "*/5 * * * *" # every 5 minutes
4+
- cron: "*/5 * * * *"
85

96
jobs:
107
auto-merge:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: jpmcb/prow-github-actions@v2.0.0
14-
with:
15-
jobs: 'lgtm'
16-
github-token: "${{ secrets.GITHUB_TOKEN }}"
17-
merge-method: 'squash'
18-
8+
uses: llm-d/llm-d-infra/.github/workflows/reusable-prow-automerge.yml@main
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: Run Jobs on PR
1+
name: Prow Remove LGTM
22
on: pull_request
33

44
jobs:
5-
execute:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: jpmcb/prow-github-actions@v2.0.0
9-
with:
10-
jobs: lgtm
11-
github-token: '${{ secrets.GITHUB_TOKEN }}'
5+
remove-lgtm:
6+
uses: llm-d/llm-d-infra/.github/workflows/reusable-prow-remove-lgtm.yml@main

0 commit comments

Comments
 (0)