Skip to content

Commit 0399221

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 97d4a79 + 9e5c6ce commit 0399221

File tree

266 files changed

+77080
-7523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+77080
-7523
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Configuration Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
kustomize_version:
7+
description: "Kustomize version to use"
8+
required: false
9+
type: string
10+
default: "v5.7.1"
11+
12+
jobs:
13+
test-with-custom-config:
14+
name: Test with Custom Configuration
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Kubernetes tools
22+
uses: ./tools/github-action/setup-kubetools
23+
with:
24+
kubectl_version: v1.28.0
25+
kustomize_version: ${{ inputs.kustomize_version }}
26+
27+
- name: Test kustomize with different overlays
28+
run: |
29+
echo "Testing base kustomization..."
30+
kustomize build deploy/kubernetes > /tmp/base-manifests.yaml
31+
32+
echo "Validating generated resources..."
33+
34+
# Check if all expected resources are present
35+
if ! grep -q "kind: Namespace" /tmp/base-manifests.yaml; then
36+
echo "Error: Namespace not found"
37+
exit 1
38+
fi
39+
40+
if ! grep -q "kind: Deployment" /tmp/base-manifests.yaml; then
41+
echo "Error: Deployment not found"
42+
exit 1
43+
fi
44+
45+
if ! grep -q "kind: Service" /tmp/base-manifests.yaml; then
46+
echo "Error: Service not found"
47+
exit 1
48+
fi
49+
50+
if ! grep -q "kind: ConfigMap" /tmp/base-manifests.yaml; then
51+
echo "Error: ConfigMap not found"
52+
exit 1
53+
fi
54+
55+
echo "✓ All expected resources are present"
56+
57+
- name: Verify ConfigMap generation
58+
run: |
59+
echo "Checking ConfigMap generation..."
60+
kustomize build deploy/kubernetes | grep -A 20 "kind: ConfigMap"
61+
62+
# Verify config files are included
63+
if ! kustomize build deploy/kubernetes | grep -q "config.yaml"; then
64+
echo "Warning: config.yaml might not be properly included in ConfigMap"
65+
fi
66+
67+
if ! kustomize build deploy/kubernetes | grep -q "tools_db.json"; then
68+
echo "Warning: tools_db.json might not be properly included in ConfigMap"
69+
fi
70+
71+
- name: Validate observability kustomization
72+
run: |
73+
echo "Validating observability stack kustomization..."
74+
if [ -d "deploy/kubernetes/observability" ]; then
75+
kustomize build deploy/kubernetes/observability > /tmp/observability-manifests.yaml
76+
echo "✓ Observability kustomization is valid"
77+
78+
# Verify expected resources
79+
for resource in "Deployment" "Service" "ConfigMap" "PersistentVolumeClaim"; do
80+
if ! grep -q "kind: $resource" /tmp/observability-manifests.yaml; then
81+
echo "Warning: $resource not found in observability manifests"
82+
fi
83+
done
84+
else
85+
echo "Observability directory not found, skipping..."
86+
fi
87+
88+
- name: Validate AI Gateway configurations
89+
run: |
90+
echo "Validating AI Gateway configurations..."
91+
92+
# Check if ai-gateway directory exists
93+
if [ -d "deploy/kubernetes/ai-gateway" ]; then
94+
# Validate configuration yamls (without CRDs)
95+
for yaml_file in deploy/kubernetes/ai-gateway/configuration/*.yaml; do
96+
if [ -f "$yaml_file" ]; then
97+
echo "Checking $yaml_file..."
98+
# Basic YAML syntax check
99+
kubectl create --dry-run=client -f "$yaml_file" || echo "Warning: Issues with $yaml_file"
100+
fi
101+
done
102+
103+
# Validate inference-pool manifests (skip CRD validation as they may not be installed)
104+
for yaml_file in deploy/kubernetes/ai-gateway/inference-pool/*.yaml; do
105+
if [ -f "$yaml_file" ]; then
106+
echo "Checking $yaml_file for YAML syntax..."
107+
# Just check if it's valid YAML
108+
kubectl create --dry-run=client -f "$yaml_file" 2>&1 | grep -q "no matches for kind" && echo "✓ $yaml_file syntax valid (CRD not installed)" || echo "Validated $yaml_file"
109+
fi
110+
done
111+
112+
echo "✓ AI Gateway configuration validation completed"
113+
else
114+
echo "AI Gateway directory not found, skipping..."
115+
fi

0 commit comments

Comments
 (0)