Replace all in-memory Map-backed stores (credentials, models, agents, tasks, iterations, usage) with Drizzle ORM queries against the homelab-pg PostgreSQL cluster. All store functions are now async. - Add 6 harness_* tables to @homelab/db schema - Generate and apply initial Drizzle migration - Add lazy DB connection proxy to avoid build-time errors - Wire DATABASE_URL from sealed secret into harness deployment - Update all API routes, orchestrator, executor, and boot to await async store operations
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: harness
|
|
labels:
|
|
app: harness
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: harness
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: harness
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: gitea-pull-secret
|
|
containers:
|
|
- name: harness
|
|
image: gitea.coreworlds.io/lazorgurl/homelab-harness:latest
|
|
ports:
|
|
- containerPort: 3100
|
|
env:
|
|
- name: HARNESS_WORK_DIR
|
|
value: /data/harness
|
|
- name: CLAUDE_CONFIG_DIR
|
|
value: /secrets/claude
|
|
- name: OPENCODE_CONFIG_DIR
|
|
value: /secrets/opencode
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: harness-db-credentials
|
|
key: database-url
|
|
volumeMounts:
|
|
- name: workspace
|
|
mountPath: /data/harness
|
|
- name: claude-credentials
|
|
mountPath: /secrets/claude
|
|
readOnly: true
|
|
- name: opencode-credentials
|
|
mountPath: /secrets/opencode
|
|
readOnly: true
|
|
resources:
|
|
requests:
|
|
memory: 256Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 1Gi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3100
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3100
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
volumes:
|
|
- name: workspace
|
|
emptyDir:
|
|
sizeLimit: 2Gi
|
|
- name: claude-credentials
|
|
secret:
|
|
secretName: harness-claude-credentials
|
|
- name: opencode-credentials
|
|
secret:
|
|
secretName: harness-opencode-credentials
|