Skip to content

Commit 48076b2

Browse files
authored
Merge branch 'main' into kserve
2 parents cd7e05a + c5f55f8 commit 48076b2

File tree

15 files changed

+1172
-951
lines changed

15 files changed

+1172
-951
lines changed

.github/workflows/helm-ci.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ jobs:
4242
helm lint ${{ env.CHART_PATH }}
4343
echo "::endgroup::"
4444
45-
- name: Run Helm lint with dev values
46-
run: |
47-
echo "::group::Helm Lint (Dev Values)"
48-
helm lint ${{ env.CHART_PATH }} -f ${{ env.CHART_PATH }}/values-dev.yaml
49-
echo "::endgroup::"
50-
51-
- name: Run Helm lint with prod values
52-
run: |
53-
echo "::group::Helm Lint (Prod Values)"
54-
helm lint ${{ env.CHART_PATH }} -f ${{ env.CHART_PATH }}/values-prod.yaml
55-
echo "::endgroup::"
56-
5745
# Template validation
5846
template-chart:
5947
name: Validate Helm Templates
@@ -75,24 +63,6 @@ jobs:
7563
echo "Templates generated successfully"
7664
echo "::endgroup::"
7765
78-
- name: Template with dev values
79-
run: |
80-
echo "::group::Template with Dev Values"
81-
helm template test-release ${{ env.CHART_PATH }} \
82-
-f ${{ env.CHART_PATH }}/values-dev.yaml \
83-
--namespace test-namespace > /tmp/dev-template.yaml
84-
echo "Dev templates generated successfully"
85-
echo "::endgroup::"
86-
87-
- name: Template with prod values
88-
run: |
89-
echo "::group::Template with Prod Values"
90-
helm template test-release ${{ env.CHART_PATH }} \
91-
-f ${{ env.CHART_PATH }}/values-prod.yaml \
92-
--namespace test-namespace > /tmp/prod-template.yaml
93-
echo "Prod templates generated successfully"
94-
echo "::endgroup::"
95-
9666
- name: Validate generated YAML
9767
run: |
9868
echo "::group::Validate YAML Syntax"
@@ -111,7 +81,6 @@ jobs:
11181
run: |
11282
echo "::group::Verify Required Resources"
11383
required_resources=(
114-
"Namespace"
11584
"ServiceAccount"
11685
"PersistentVolumeClaim"
11786
"ConfigMap"
@@ -128,6 +97,7 @@ jobs:
12897
fi
12998
done
13099
echo "All required resources found"
100+
echo "Note: Namespace is managed by Helm's --create-namespace flag"
131101
echo "::endgroup::"
132102
133103
- name: Upload templates as artifacts
@@ -185,15 +155,15 @@ jobs:
185155
kubectl get namespace vllm-semantic-router-system
186156
echo "::endgroup::"
187157
188-
- name: Install Helm chart with dev values (CI minimal config)
158+
- name: Install Helm chart (CI minimal config)
189159
run: |
190160
echo "::group::Install Chart"
191161
# CI environment: Download only essential model to avoid OOM
192162
# Only download all-MiniLM-L12-v2 (smallest model ~120MB)
193163
helm install semantic-router ${{ env.CHART_PATH }} \
194-
-f ${{ env.CHART_PATH }}/values-dev.yaml \
195164
--set initContainer.resources.limits.memory=2Gi \
196165
--set initContainer.resources.requests.memory=1Gi \
166+
--set-json 'initContainer.models=[{"name":"all-MiniLM-L12-v2","repo":"sentence-transformers/all-MiniLM-L12-v2"}]' \
197167
--namespace vllm-semantic-router-system \
198168
--wait \
199169
--timeout 10m \
@@ -302,7 +272,6 @@ jobs:
302272
echo "::group::Upgrade Chart"
303273
# Use same minimal config for upgrade test
304274
helm upgrade semantic-router ${{ env.CHART_PATH }} \
305-
-f ${{ env.CHART_PATH }}/values-dev.yaml \
306275
--set initContainer.resources.limits.memory=2Gi \
307276
--set initContainer.resources.requests.memory=1Gi \
308277
--set-json 'initContainer.models=[{"name":"all-MiniLM-L12-v2","repo":"sentence-transformers/all-MiniLM-L12-v2"}]' \

.github/workflows/helm-publish.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Publish Helm Chart
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'deploy/helm/**'
9+
- '.github/workflows/helm-publish.yml'
10+
workflow_dispatch:
11+
12+
env:
13+
HELM_VERSION: v3.14.0
14+
CHART_PATH: deploy/helm/semantic-router
15+
REGISTRY: ghcr.io
16+
CHART_NAME: semantic-router
17+
18+
jobs:
19+
publish-chart:
20+
name: Publish Helm Chart to GHCR
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
packages: write
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Helm
30+
uses: azure/setup-helm@v4
31+
with:
32+
version: ${{ env.HELM_VERSION }}
33+
34+
- name: Set lowercase repository owner
35+
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
36+
37+
- name: Log in to GitHub Container Registry
38+
run: |
39+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} --username ${{ github.actor }} --password-stdin
40+
41+
- name: Modify chart version to latest
42+
run: |
43+
echo "::group::Modify Chart.yaml"
44+
# Backup original Chart.yaml
45+
cp ${{ env.CHART_PATH }}/Chart.yaml ${{ env.CHART_PATH }}/Chart.yaml.bak
46+
47+
# Replace version with 'v0.0.0-latest' (valid semver with prerelease tag)
48+
sed -i 's/^version:.*/version: v0.0.0-latest/' ${{ env.CHART_PATH }}/Chart.yaml
49+
50+
echo "Modified Chart.yaml:"
51+
grep '^version:' ${{ env.CHART_PATH }}/Chart.yaml
52+
echo "::endgroup::"
53+
54+
- name: Package Helm chart
55+
run: |
56+
echo "::group::Package Chart"
57+
mkdir -p ./dist
58+
helm package ${{ env.CHART_PATH }} --destination ./dist
59+
echo "::endgroup::"
60+
61+
echo "::group::Packaged Chart"
62+
ls -lh ./dist/
63+
echo "::endgroup::"
64+
65+
- name: Push chart to GHCR
66+
run: |
67+
echo "::group::Push to GHCR"
68+
CHART_PACKAGE="./dist/${{ env.CHART_NAME }}-v0.0.0-latest.tgz"
69+
70+
# Push to GHCR using OCI format with v0.0.0-latest tag
71+
helm push "${CHART_PACKAGE}" oci://${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts
72+
73+
echo "::endgroup::"
74+
75+
echo "✓ Chart published successfully!"
76+
echo "Chart: ${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts/${{ env.CHART_NAME }}:v0.0.0-latest"
77+
78+
- name: Restore original Chart.yaml
79+
if: always()
80+
run: |
81+
# Restore original Chart.yaml
82+
if [ -f "${{ env.CHART_PATH }}/Chart.yaml.bak" ]; then
83+
mv ${{ env.CHART_PATH }}/Chart.yaml.bak ${{ env.CHART_PATH }}/Chart.yaml
84+
echo "Chart.yaml restored"
85+
fi
86+
87+
- name: Create release summary
88+
run: |
89+
cat >> $GITHUB_STEP_SUMMARY << EOF
90+
## 📦 Helm Chart Published
91+
92+
**Chart:** \`${{ env.CHART_NAME }}\`
93+
**Version:** \`v0.0.0-latest\`
94+
**Registry:** \`${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts\`
95+
96+
### Installation
97+
98+
\`\`\`bash
99+
# Pull the chart
100+
helm pull oci://${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts/${{ env.CHART_NAME }} --version v0.0.0-latest
101+
102+
# Install directly
103+
helm install semantic-router oci://${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts/${{ env.CHART_NAME }} \\
104+
--version v0.0.0-latest \\
105+
--namespace vllm-semantic-router-system \\
106+
--create-namespace
107+
\`\`\`
108+
109+
### Upgrade
110+
111+
\`\`\`bash
112+
helm upgrade semantic-router oci://${{ env.REGISTRY }}/${{ env.REPOSITORY_OWNER_LOWER }}/charts/${{ env.CHART_NAME }} \\
113+
--version v0.0.0-latest \\
114+
--namespace vllm-semantic-router-system
115+
\`\`\`
116+
EOF
117+
118+
- name: Logout from registry
119+
if: always()
120+
run: |
121+
helm registry logout ${{ env.REGISTRY }} || true
122+

0 commit comments

Comments
 (0)