mirror of
https://github.com/sredevopsorg/deepseek-kubernetes-sandbox.git
synced 2026-11-03 01:13:24 +00:00
Port the upstream hermes-agents-as-a-service example to DSH Web: numbered manifests (00-prereqs .. 50-gateway), a Python gateway (signup, per-user tokens, wake-on-connect proxy, idle suspend), run-test-kind.sh smoke test, and docs. Fix deploy/k8s/sandbox-template.yaml (v1beta1, correct image, volumeClaimTemplates). Add a validate workflow (manifest server dry-run + gateway unit tests). Co-authored-by: SREDevOpsAgents <agents@sredevops.org>
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Validate
|
|
|
|
# Validates the Kubernetes manifests against the real agent-sandbox CRD
|
|
# schema (server-side dry-run on a throwaway kind cluster) and runs the
|
|
# gateway unit tests. Runs on every PR and on pushes to main.
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate-manifests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create kind cluster
|
|
uses: helm/kind-action@v1.10.0
|
|
with:
|
|
version: v0.23.0
|
|
cluster_name: dsh-validate
|
|
|
|
- name: Install agent-sandbox (extensions)
|
|
run: |
|
|
VERSION=v1.0.7
|
|
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${VERSION}/sandbox-with-extensions.yaml
|
|
kubectl wait --for=condition=Established crd/sandboxtemplates.extensions.agents.x-k8s.io --timeout=180s
|
|
kubectl wait --for=condition=Established crd/sandboxwarmpools.extensions.agents.x-k8s.io --timeout=180s
|
|
kubectl wait --for=condition=Established crd/sandboxclaims.extensions.agents.x-k8s.io --timeout=180s
|
|
kubectl wait --for=condition=Established crd/sandboxes.agents.x-k8s.io --timeout=180s
|
|
|
|
- name: Validate manifests (server dry-run)
|
|
run: |
|
|
set -euo pipefail
|
|
kubectl create namespace dsh-demo
|
|
for f in examples/dsh-agents-as-a-service/*.yaml; do
|
|
echo "== $f =="
|
|
kubectl apply --dry-run=server -f "$f"
|
|
done
|
|
kubectl apply --dry-run=server -f deploy/k8s/sandbox-template.yaml
|
|
echo "all manifests validated"
|
|
|
|
gateway-tests:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: examples/dsh-agents-as-a-service/gateway
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt pytest
|
|
|
|
- name: Run gateway unit tests
|
|
run: python -m pytest test_gateway.py -v
|