mirror of
https://github.com/hanzoai/agent.git
synced 2026-10-30 15:05:34 +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.
140 lines
5.5 KiB
YAML
140 lines
5.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "hanzo-agents.controlPlane.fullname" . }}
|
|
labels:
|
|
{{- include "hanzo-agents.labels" . | nindent 4 }}
|
|
{{- with .Values.controlPlane.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
replicas: {{ .Values.controlPlane.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "hanzo-agents.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: control-plane
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "hanzo-agents.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: control-plane
|
|
{{- with .Values.controlPlane.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.controlPlane.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: control-plane
|
|
image: "{{ .Values.controlPlane.image.repository }}:{{ .Values.controlPlane.image.tag }}"
|
|
imagePullPolicy: {{ .Values.controlPlane.image.pullPolicy }}
|
|
args:
|
|
- server
|
|
- --open=false
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.controlPlane.service.port }}
|
|
- name: grpc
|
|
containerPort: {{ include "hanzo-agents.controlPlane.grpcPort" . }}
|
|
env:
|
|
- name: HANZO_AGENTS_PORT
|
|
value: {{ .Values.controlPlane.service.port | quote }}
|
|
- name: HANZO_AGENTS_STORAGE_MODE
|
|
value: {{ .Values.controlPlane.storage.mode | quote }}
|
|
{{- if eq .Values.controlPlane.storage.mode "postgres" }}
|
|
{{- if .Values.postgres.enabled }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_HOST
|
|
value: {{ include "hanzo-agents.postgres.fullname" . | quote }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_PORT
|
|
value: "5432"
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_DATABASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "hanzo-agents.postgres.secretName" . }}
|
|
key: {{ .Values.postgres.auth.existingSecretDatabaseKey }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "hanzo-agents.postgres.secretName" . }}
|
|
key: {{ .Values.postgres.auth.existingSecretUsernameKey }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "hanzo-agents.postgres.secretName" . }}
|
|
key: {{ .Values.postgres.auth.existingSecretPasswordKey }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_SSLMODE
|
|
value: "disable"
|
|
{{- else }}
|
|
{{- $postgresUrl := include "hanzo-agents.controlPlane.postgresUrl" . }}
|
|
- name: HANZO_AGENTS_STORAGE_POSTGRES_URL
|
|
value: {{ required "controlPlane.storage.postgresUrl is required when controlPlane.storage.mode=postgres and postgres.enabled=false" $postgresUrl | quote }}
|
|
- name: HANZO_AGENTS_POSTGRES_URL
|
|
value: {{ required "controlPlane.storage.postgresUrl is required when controlPlane.storage.mode=postgres and postgres.enabled=false" $postgresUrl | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range $name, $value := .Values.controlPlane.env }}
|
|
- name: {{ $name }}
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- if .Values.apiAuth.enabled }}
|
|
- name: HANZO_AGENTS_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "hanzo-agents.apiAuth.secretName" . }}
|
|
key: {{ .Values.apiAuth.existingSecretKey }}
|
|
{{- end }}
|
|
{{- with .Values.controlPlane.extraEnv }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: {{ .Values.controlPlane.env.HANZO_AGENTS_HOME | default "/data" | quote }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
{{- with .Values.controlPlane.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.controlPlane.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: data
|
|
{{- if .Values.controlPlane.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ default (printf "%s-data" (include "hanzo-agents.controlPlane.fullname" .)) .Values.controlPlane.persistence.existingClaim }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- with .Values.controlPlane.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controlPlane.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.controlPlane.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|