Files
tasks/k8s/deployment.yaml
zeekayandHanzo Dev 679ae61163 feat(transport): address the engine and the SDK, so both can use a socket
The engine took a PORT and the SDK an Options.HostPort, so neither end
could use a unix socket for traffic that never leaves the host. The
field name was not the only obstacle: luxfi/zap bound net.Listen("tcp",
":port") and reached a peer with net.DialTimeout("tcp", addr), so a path
was refused at the dialer with "missing port in address" and could not
be bound at all. That is fixed upstream (luxfi/zap Address + Network);
this pins the commit until it is tagged.

EmbedConfig.Address, Embedded.Address, ServeGated(addr) and
client.Options.Address each take ONE address, because a port is a detail
of one transport rather than a thing every listener has. A path binds or
dials a unix socket; anything else is host:port.

TestDialRequiresHostPort became TestDialRequiresAddress: Dial needs an
address, and asserts a socket path is refused for being absent rather
than for being portless. TestE2E_UnixSocket runs a real workflow over a
socket end to end, and TestE2E_UnixSocketRebind proves the socket is
unlinked on stop so a restart binds cleanly.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 16:27:19 -07:00

121 lines
3.0 KiB
YAML

# Hanzo Tasks — native ZAP daemon. One Go binary, embedded UI.
# Routing: tasks.hanzo.ai (UI + REST) / tasks-zap.hanzo.ai (ZAP) — see ingress.yaml.
# Auth: hanzo.id IAM JWT, validated upstream by hanzoai/gateway.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tasks
namespace: hanzo
labels:
app: tasks
app.kubernetes.io/name: tasks
app.kubernetes.io/part-of: hanzo-platform
app.kubernetes.io/managed-by: hanzo-universe
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: tasks
template:
metadata:
labels:
app: tasks
app.kubernetes.io/name: tasks
app.kubernetes.io/part-of: hanzo-platform
app.kubernetes.io/managed-by: hanzo-universe
spec:
imagePullSecrets:
- name: ghcr-secret
containers:
- name: tasks
image: ghcr.io/hanzoai/tasks:v3.3.1
imagePullPolicy: IfNotPresent
args:
- --zap=:9999
- --http=:7243
- --data=/data
- --namespace=$(TASKS_NAMESPACE)
ports:
- containerPort: 9999
name: zap
- containerPort: 7243
name: http
env:
- name: TASKS_NAMESPACE
value: hanzo
# Trust X-Org-Id/X-User-Id/X-User-Email from hanzoai/gateway
# only. Gateway strips client-supplied identity headers before
# forwarding (see global CLAUDE.md HTTP header convention).
- name: TASKSD_REQUIRE_IDENTITY
value: "true"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://otel-collector.hanzo.svc:4318
- name: OTEL_SERVICE_NAME
value: tasks
- name: LOG_LEVEL
value: info
volumeMounts:
- name: data
mountPath: /data
startupProbe:
httpGet: { path: /healthz, port: 7243 }
initialDelaySeconds: 2
periodSeconds: 2
failureThreshold: 30
readinessProbe:
httpGet: { path: /healthz, port: 7243 }
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet: { path: /healthz, port: 7243 }
initialDelaySeconds: 30
periodSeconds: 30
failureThreshold: 5
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: "1"
memory: 512Mi
volumes:
- name: data
persistentVolumeClaim:
claimName: tasks-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tasks-data
namespace: hanzo
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: tasks
namespace: hanzo
spec:
selector:
app: tasks
ports:
- name: http
port: 80
targetPort: 7243
- name: zap
port: 9999
targetPort: 9999