Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 9 additions & 9 deletions .github/workflows/k8s-config-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Test kustomize with different overlays
run: |
echo "Testing base kustomization..."
kustomize build deploy/kubernetes > /tmp/base-manifests.yaml
kustomize build deploy/kubernetes/ai-gateway/semantic-router > /tmp/base-manifests.yaml

echo "Validating generated resources..."

Expand Down Expand Up @@ -57,22 +57,22 @@ jobs:
- name: Verify ConfigMap generation
run: |
echo "Checking ConfigMap generation..."
kustomize build deploy/kubernetes | grep -A 20 "kind: ConfigMap"
kustomize build deploy/kubernetes/ai-gateway/semantic-router | grep -A 20 "kind: ConfigMap"

# Verify config files are included
if ! kustomize build deploy/kubernetes | grep -q "config.yaml"; then
if ! kustomize build deploy/kubernetes/ai-gateway/semantic-router | grep -q "config.yaml"; then
echo "Warning: config.yaml might not be properly included in ConfigMap"
fi

if ! kustomize build deploy/kubernetes | grep -q "tools_db.json"; then
if ! kustomize build deploy/kubernetes/ai-gateway/semantic-router | grep -q "tools_db.json"; then
echo "Warning: tools_db.json might not be properly included in ConfigMap"
fi

- name: Validate observability kustomization
run: |
echo "Validating observability stack kustomization..."
if [ -d "deploy/kubernetes/observability" ]; then
kustomize build deploy/kubernetes/observability > /tmp/observability-manifests.yaml
if [ -d "deploy/kubernetes/ai-gateway/semantic-router/observability" ]; then
kustomize build deploy/kubernetes/ai-gateway/semantic-router/observability > /tmp/observability-manifests.yaml
echo "✓ Observability kustomization is valid"

# Verify expected resources
Expand All @@ -90,9 +90,9 @@ jobs:
echo "Validating AI Gateway configurations..."

# Check if ai-gateway directory exists
if [ -d "deploy/kubernetes/ai-gateway" ]; then
if [ -d "deploy/kubernetes/ai-gateway/semantic-router/ai-gateway" ]; then
# Validate configuration yamls (without CRDs)
for yaml_file in deploy/kubernetes/ai-gateway/configuration/*.yaml; do
for yaml_file in deploy/kubernetes/ai-gateway/semantic-router/ai-gateway/configuration/*.yaml; do
if [ -f "$yaml_file" ]; then
echo "Checking $yaml_file..."
# Basic YAML syntax check
Expand All @@ -101,7 +101,7 @@ jobs:
done

# Validate inference-pool manifests (skip CRD validation as they may not be installed)
for yaml_file in deploy/kubernetes/ai-gateway/inference-pool/*.yaml; do
for yaml_file in deploy/kubernetes/ai-gateway/semantic-router/ai-gateway/inference-pool/*.yaml; do
if [ -f "$yaml_file" ]; then
echo "Checking $yaml_file for YAML syntax..."
# Just check if it's valid YAML
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k8s-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name: Kubernetes Integration Test
on:
pull_request:
paths:
- "deploy/kubernetes/**"
- "deploy/kubernetes/ai-gateway/semantic-router/**"
- ".github/workflows/k8s-integration-test*.yml"
- "Dockerfile.extproc"
- "tools/kind/**"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/k8s-kind-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
echo "Preparing CI deployment configuration..."

# Create a temporary kustomization file for CI
cd deploy/kubernetes
cd deploy/kubernetes/ai-gateway/semantic-router

# Backup original kustomization.yaml
cp kustomization.yaml kustomization.yaml.backup
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
- name: Deploy to kind cluster
run: |
echo "Deploying semantic-router to kind cluster..."
kustomize build deploy/kubernetes | kubectl apply -f -
kustomize build deploy/kubernetes/ai-gateway/semantic-router | kubectl apply -f -

echo "Waiting for namespace to be active..."
kubectl wait --for=jsonpath='{.status.phase}'=Active namespace/vllm-semantic-router-system --timeout=60s
Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:
echo "Cleaning up kind cluster..."
kind delete cluster --name semantic-router-cluster || true
echo "Restoring original kustomization..."
cd deploy/kubernetes
cd deploy/kubernetes/ai-gateway/semantic-router
if [ -f kustomization.yaml.backup ]; then
mv kustomization.yaml.backup kustomization.yaml
fi
4 changes: 2 additions & 2 deletions .github/workflows/k8s-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
scan-type: "config"
scan-ref: "deploy/kubernetes"
scan-ref: "deploy/kubernetes/ai-gateway/semantic-router"
format: "sarif"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Run Checkov scan
uses: bridgecrewio/checkov-action@master
with:
directory: deploy/kubernetes
directory: deploy/kubernetes/ai-gateway/semantic-router
framework: kubernetes
output_format: cli
soft_fail: true # Don't fail the build
4 changes: 2 additions & 2 deletions .github/workflows/k8s-validate-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Validate Kustomize build
run: |
echo "Building kustomization..."
kustomize build deploy/kubernetes > /tmp/k8s-manifests.yaml
kustomize build deploy/kubernetes/ai-gateway/semantic-router > /tmp/k8s-manifests.yaml
echo "Kustomize build successful!"
echo "Generated manifests:"
cat /tmp/k8s-manifests.yaml
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Validate manifests with kubeconform
run: |
echo "Validating Kubernetes manifests..."
kustomize build deploy/kubernetes | \
kustomize build deploy/kubernetes/ai-gateway/semantic-router | \
kubeconform -strict -summary \
-kubernetes-version 1.28.0 \
-schema-location default \
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/quickstart-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ jobs:

echo "Full response: $response"

# Validate response structure
if echo "$response" | jq -e '.choices[0].message.content' > /dev/null 2>&1; then
echo "✓ Semantic router successfully routed and processed the query"
echo " Answer: $(echo "$response" | jq -r '.choices[0].message.content' | head -c 200)"
else
echo "::error::Semantic router failed to process query correctly"
echo "Response was: $response"
exit 1
fi

- name: Show service logs on failure
if: failure()
run: |
Expand Down
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ vllm_endpoints:
model_config:
"qwen3":
reasoning_family: "qwen3" # This model uses Qwen-3 reasoning syntax
preferred_endpoints: ["endpoint1"]
preferred_endpoints: ["endpoint1"] # Optional: omit to let upstream handle endpoint selection
pii_policy:
allow_by_default: true

Expand Down
3 changes: 1 addition & 2 deletions config/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ static_resources:
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
request_id: "%REQ(X-REQUEST-ID)%"
selected_model: "%REQ(X-SELECTED-MODEL)%"
selected_endpoint: "%REQ(X-GATEWAY-DESTINATION-ENDPOINT)%"
route_config:
name: local_route
virtual_hosts:
Expand Down Expand Up @@ -106,7 +105,7 @@ static_resources:
lb_policy: CLUSTER_PROVIDED
original_dst_lb_config:
use_http_header: true
http_header_name: "x-gateway-destination-endpoint"
http_header_name: "x-vsr-destination-endpoint"
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
Expand Down
3 changes: 1 addition & 2 deletions deploy/docker-compose/addons/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ static_resources:
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
request_id: "%REQ(X-REQUEST-ID)%"
selected_model: "%REQ(X-SELECTED-MODEL)%"
selected_endpoint: "%REQ(X-GATEWAY-DESTINATION-ENDPOINT)%"
route_config:
name: local_route
virtual_hosts:
Expand Down Expand Up @@ -106,7 +105,7 @@ static_resources:
lb_policy: CLUSTER_PROVIDED
original_dst_lb_config:
use_http_header: true
http_header_name: "x-gateway-destination-endpoint"
http_header_name: "x-vsr-destination-endpoint"
typed_extension_protocol_options:
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
Expand Down
Loading
Loading