mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
- BillingService client calls Commerce API for balance checks and debits - Balance gate in prepareExecution blocks $0 balance with HTTP 402 - Post-execution billing in completeExecution/failExecution debits actual cost - Balance proxy endpoint at GET /api/v1/billing/balance - DB migration adds billing fields to executions table - K8s deployment wired with BILLING_COMMERCE_URL and admin token secret Co-authored-by: Hanzo Dev <[email protected]>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: hanzo-agents-control-plane
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: control-plane
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: control-plane
|
|
spec:
|
|
containers:
|
|
- name: control-plane
|
|
image: hanzo-agents/control-plane:latest
|
|
args: ["server", "--open=false"]
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
- name: grpc
|
|
containerPort: 8180
|
|
env:
|
|
- name: HANZO_AGENTS_PORT
|
|
value: "8080"
|
|
- name: HANZO_AGENTS_HOME
|
|
value: "/data"
|
|
- name: HANZO_AGENTS_CONFIG_FILE
|
|
value: "/dev/null"
|
|
- name: HANZO_AGENTS_STORAGE_MODE
|
|
value: "local"
|
|
- name: BILLING_COMMERCE_URL
|
|
value: "http://commerce.hanzo.svc.cluster.local:8001"
|
|
- name: BILLING_ADMIN_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: control-plane-billing
|
|
key: admin-token
|
|
- name: BILLING_CURRENCY
|
|
value: "usd"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: hanzo-agents-control-plane-data
|