mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
Consolidate all Hanzo agent infrastructure into one repo: - control-plane/: Go control plane server (was agents-new) - sdk/: Go, Python, TypeScript SDKs - deployments/: Docker, Kubernetes, Helm configs - Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest) - CI builds both SDK + control-plane images No more agentfield — everything is hanzoai/agent.
81 lines
2.9 KiB
YAML
81 lines
2.9 KiB
YAML
{{- if .Values.demoPythonAgent.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "hanzo-agents.fullname" . }}-demo-python-agent
|
|
labels:
|
|
{{- include "hanzo-agents.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "hanzo-agents.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: demo-python-agent
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "hanzo-agents.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: demo-python-agent
|
|
spec:
|
|
initContainers:
|
|
- name: wait-control-plane
|
|
image: curlimages/curl:8.12.1
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- sh
|
|
- -c
|
|
- >
|
|
until curl -sf "http://{{ include "hanzo-agents.controlPlane.fullname" . }}:{{ .Values.controlPlane.service.port }}/api/v1/health" >/dev/null;
|
|
do echo "waiting for control plane"; sleep 2; done
|
|
containers:
|
|
- name: demo-python-agent
|
|
image: "{{ .Values.demoPythonAgent.image.repository }}:{{ .Values.demoPythonAgent.image.tag }}"
|
|
imagePullPolicy: {{ .Values.demoPythonAgent.image.pullPolicy }}
|
|
command:
|
|
- sh
|
|
- -c
|
|
- >
|
|
python -m pip install --no-cache-dir --upgrade pip &&
|
|
python -m pip install --no-cache-dir {{ .Values.demoPythonAgent.pipPackage | quote }} &&
|
|
python /app/main.py
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.demoPythonAgent.service.port }}
|
|
env:
|
|
- name: HANZO_AGENTS_URL
|
|
value: "http://{{ include "hanzo-agents.controlPlane.fullname" . }}:{{ .Values.controlPlane.service.port }}"
|
|
- name: AGENT_NODE_ID
|
|
value: {{ .Values.demoPythonAgent.nodeId | quote }}
|
|
- name: PORT
|
|
value: {{ .Values.demoPythonAgent.service.port | quote }}
|
|
- name: AGENT_CALLBACK_URL
|
|
value: "http://{{ include "hanzo-agents.fullname" . }}-demo-python-agent:{{ .Values.demoPythonAgent.service.port }}"
|
|
{{- if .Values.apiAuth.enabled }}
|
|
- name: HANZO_AGENTS_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "hanzo-agents.apiAuth.secretName" . }}
|
|
key: {{ .Values.apiAuth.existingSecretKey }}
|
|
{{- end }}
|
|
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: {{ include "hanzo-agents.fullname" . }}-demo-python-agent
|
|
{{- end }}
|
|
|