Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
68 changes: 68 additions & 0 deletions .crd-ref-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
processor:
# Ignore fields that are common to all Kubernetes resources
ignoreFields:
- "TypeMeta"
- "ObjectMeta"
- "ListMeta"

# Ignore types that are not relevant for documentation
ignoreTypes:
- "metav1.Time"
- "metav1.Duration"
- "metav1.ObjectMeta"
- "metav1.TypeMeta"
- "metav1.ListMeta"

# Source path for Go API types
sourcePath: "./src/semantic-router/pkg/apis/vllm.ai/v1alpha1"

render:
# Enable Kubebuilder markers rendering
kubebuilderMarkers: true

# Group resources by Kind
groupByKind: true

# Include table of contents
includeTableOfContents: true

# Custom templates (optional)
# templatesDir: "./docs/crd-templates"

# Output format: markdown, asciidoc, or html
format: markdown

# Custom configuration for your CRDs
groups:
- name: vllm.ai
displayName: "vLLM Semantic Router"
description: |
Custom Resource Definitions for vLLM Semantic Router.
These CRDs enable declarative configuration of intelligent routing and model pools.

kinds:
- name: IntelligentRoute
displayName: "Intelligent Route"
description: |
IntelligentRoute defines intelligent routing rules and decisions for LLM requests.
It supports decision-based routing with rule combinations, model references, and plugins.

- name: IntelligentPool
displayName: "Intelligent Pool"
description: |
IntelligentPool defines a pool of LLM models with their configurations.
It manages model endpoints, reasoning families, and model-specific settings.

# Markdown rendering options
markdown:
# Header level for the main title
headerLevel: 1

# Include examples in the documentation
includeExamples: true

# Include status subresource documentation
includeStatus: true

# Code block language for YAML examples
codeBlockLanguage: yaml
3 changes: 0 additions & 3 deletions .github/workflows/integration-test-docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Integration Test [Docker Compose]

on:
pull_request:
branches:
- main
workflow_dispatch: # Allow manual triggering

jobs:
Expand Down
166 changes: 166 additions & 0 deletions .github/workflows/integration-test-dynamic-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: Integration Test [Dynamic Config]

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch: # Allow manual triggering

jobs:
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.90

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
make \
curl \
build-essential \
pkg-config

- name: Install Kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl

- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

- name: Download E2E test dependencies
run: |
cd e2e && go mod download

- name: Build E2E test binary
run: |
make build-e2e

- name: Run Dynamic Config E2E tests
id: e2e-test
run: |
set +e # Don't exit on error, we want to capture the result
make e2e-test E2E_PROFILE=dynamic-config E2E_VERBOSE=true E2E_KEEP_CLUSTER=false
TEST_EXIT_CODE=$?
echo "test_exit_code=${TEST_EXIT_CODE}" >> $GITHUB_OUTPUT
exit ${TEST_EXIT_CODE}

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-dynamic-config
path: |
test-report.json
test-report.md
semantic-router-logs.txt
retention-days: 30

- name: Create test summary from report
if: always()
run: |
if [ -f "test-report.md" ]; then
echo "=== Reading test report from test-report.md ==="
cat test-report.md >> $GITHUB_STEP_SUMMARY

# Add semantic-router logs section if available
if [ -f "semantic-router-logs.txt" ]; then
cat >> $GITHUB_STEP_SUMMARY << 'EOF'

---

### 📝 Semantic Router Logs

<details>
<summary>Click to view semantic-router logs</summary>

```
EOF
# Add first 500 lines of logs to summary (to avoid exceeding GitHub limits)
head -n 500 semantic-router-logs.txt >> $GITHUB_STEP_SUMMARY

# Check if there are more lines
TOTAL_LINES=$(wc -l < semantic-router-logs.txt)
if [ "$TOTAL_LINES" -gt 500 ]; then
cat >> $GITHUB_STEP_SUMMARY << EOF

... (showing first 500 lines of $TOTAL_LINES total lines)

📦 Full logs are available in the workflow artifacts: semantic-router-logs.txt
EOF
fi

cat >> $GITHUB_STEP_SUMMARY << 'EOF'
```

</details>
EOF
fi

# Add additional context
cat >> $GITHUB_STEP_SUMMARY << 'EOF'

---

### 📚 Additional Resources

- **Trigger:** ${{ github.event_name }}
- **Branch:** `${{ github.ref_name }}`
- **Commit:** `${{ github.sha }}`
- **Workflow Run:** [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
- [E2E Test Framework Documentation](https://github.com/${{ github.repository }}/tree/main/e2e)
- [Dynamic Config Profile](https://github.com/${{ github.repository }}/tree/main/e2e/profiles/dynamic-config)

### 📦 Artifacts

- **test-report.json** - Detailed test results in JSON format
- **test-report.md** - Human-readable test report
- **semantic-router-logs.txt** - Complete semantic-router pod logs
- All artifacts are retained for 30 days

### 🔧 Dynamic Config Profile

This test validates the Kubernetes CRD-based dynamic configuration feature:
- IntelligentPool CRD for model configuration
- IntelligentRoute CRD for routing decisions
- Controller-runtime based reconciliation
- Automatic configuration updates on CRD changes
EOF
else
echo "⚠️ Test report file not found!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The E2E test framework did not generate a report file." >> $GITHUB_STEP_SUMMARY
echo "This might indicate that the test failed before report generation." >> $GITHUB_STEP_SUMMARY
fi

- name: Clean up
if: always()
run: |
make e2e-cleanup || true


Loading
Loading