Files
agents/deployments/helm/hanzo-agents/templates/demo-python-agent-deployment.yaml
zeekayandHanzo Dev ff7d100496 Everything that calls the control plane calls /v1
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]>
2026-09-11 04:10:35 -07:00

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 }}/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 }}