mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
The server mounts /v1, /v1/ui and /v2/ui. The UI and its dev proxy, the helm and kubernetes health probes, functional tests, project templates, examples and scripts still called /api/v1, so the probes failed and the UI's requests missed. Co-authored-by: Hanzo Dev <[email protected]>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: hanzo-agents-demo-python-agent
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: demo-python-agent
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: demo-python-agent
|
|
spec:
|
|
initContainers:
|
|
- name: wait-control-plane
|
|
image: curlimages/curl:8.12.1
|
|
command:
|
|
- sh
|
|
- -c
|
|
- >
|
|
until curl -sf "http://hanzo-agents-control-plane:8080/v1/health" >/dev/null;
|
|
do echo "waiting for control plane"; sleep 2; done
|
|
containers:
|
|
- name: demo-python-agent
|
|
image: python:3.11-slim
|
|
command:
|
|
- sh
|
|
- -c
|
|
- >
|
|
python -m pip install --no-cache-dir --upgrade pip &&
|
|
python -m pip install --no-cache-dir hanzo-agents &&
|
|
python /app/main.py
|
|
ports:
|
|
- name: http
|
|
containerPort: 8001
|
|
env:
|
|
- name: HANZO_AGENTS_URL
|
|
value: http://hanzo-agents-control-plane:8080
|
|
- name: AGENT_NODE_ID
|
|
value: demo-python-agent
|
|
- name: PORT
|
|
value: "8001"
|
|
- name: AGENT_CALLBACK_URL
|
|
value: http://hanzo-agents-demo-python-agent:8001
|
|
volumeMounts:
|
|
- name: app
|
|
mountPath: /app
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
volumes:
|
|
- name: app
|
|
configMap:
|
|
name: hanzo-agents-demo-python-agent
|
|
|