Files
hanzoai_agent/deployments/helm/hanzo-agents/templates/postgres-statefulset.yaml
zeekay 2899aeaa9f feat: merge agents control plane + SDKs into unified agent repo
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.
2026-02-13 12:24:31 -08:00

79 lines
2.7 KiB
YAML

{{- if .Values.postgres.enabled -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "hanzo-agents.postgres.fullname" . }}
labels:
{{- include "hanzo-agents.labels" . | nindent 4 }}
spec:
serviceName: {{ include "hanzo-agents.postgres.fullname" . }}
replicas: 1
selector:
matchLabels:
{{- include "hanzo-agents.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: postgres
template:
metadata:
labels:
{{- include "hanzo-agents.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: postgres
spec:
{{- if not .Values.postgres.persistence.enabled }}
volumes:
- name: data
emptyDir: {}
{{- end }}
containers:
- name: postgres
image: "{{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
imagePullPolicy: {{ .Values.postgres.image.pullPolicy }}
ports:
- name: postgres
containerPort: 5432
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: {{ include "hanzo-agents.postgres.secretName" . }}
key: {{ .Values.postgres.auth.existingSecretUsernameKey }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "hanzo-agents.postgres.secretName" . }}
key: {{ .Values.postgres.auth.existingSecretPasswordKey }}
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: {{ include "hanzo-agents.postgres.secretName" . }}
key: {{ .Values.postgres.auth.existingSecretDatabaseKey }}
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
livenessProbe:
tcpSocket:
port: postgres
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
tcpSocket:
port: postgres
initialDelaySeconds: 5
periodSeconds: 5
{{- if .Values.postgres.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: data
labels:
{{- include "hanzo-agents.labels" . | nindent 10 }}
spec:
accessModes:
{{- toYaml .Values.postgres.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.postgres.persistence.size | quote }}
{{- if .Values.postgres.persistence.storageClass }}
storageClassName: {{ .Values.postgres.persistence.storageClass | quote }}
{{- end }}
{{- end }}
{{- end }}