Files
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

67 lines
2.4 KiB
YAML

{{- if .Values.demoAgent.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hanzo-agents.demoAgent.fullname" . }}
labels:
{{- include "hanzo-agents.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "hanzo-agents.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: demo-agent
template:
metadata:
labels:
{{- include "hanzo-agents.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: demo-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-agent
image: "{{ .Values.demoAgent.image.repository }}:{{ .Values.demoAgent.image.tag }}"
imagePullPolicy: {{ .Values.demoAgent.image.pullPolicy }}
args: ["serve"]
ports:
- name: http
containerPort: {{ .Values.demoAgent.service.port }}
env:
- name: HANZO_AGENTS_URL
value: "http://{{ include "hanzo-agents.controlPlane.fullname" . }}:{{ .Values.controlPlane.service.port }}"
- name: AGENT_NODE_ID
value: {{ .Values.demoAgent.nodeId | quote }}
- name: AGENT_LISTEN_ADDR
value: ":{{ .Values.demoAgent.service.port }}"
- name: AGENT_PUBLIC_URL
value: "http://{{ include "hanzo-agents.demoAgent.fullname" . }}:{{ .Values.demoAgent.service.port }}"
{{- if .Values.apiAuth.enabled }}
- name: HANZO_AGENTS_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "hanzo-agents.apiAuth.secretName" . }}
key: {{ .Values.apiAuth.existingSecretKey }}
{{- end }}
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 2
periodSeconds: 5
{{- end }}