rdev/deployments/k8s/base/claudebox.yaml
jordan aaf66764fb feat: add worker pool infrastructure for composable projects
- Add POST /workers/register and POST /workers/{workerId}/heartbeat endpoints
- Start worker health checker goroutine in main.go
- Fix network policy to allow K8s API server access (includes real endpoint IPs)
- Add rdev.orchard9.ai/role: worker label to claudebox StatefulSet

This enables the embedded WorkExecutor to reach claudebox-0 for executing
builds on composable projects that don't have dedicated pods.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:55:37 -07:00

93 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: claudebox
namespace: rdev
labels:
app.kubernetes.io/name: claudebox
app.kubernetes.io/part-of: rdev
spec:
serviceName: claudebox
replicas: 1
selector:
matchLabels:
app: claudebox
template:
metadata:
labels:
app: claudebox
app.kubernetes.io/name: claudebox
app.kubernetes.io/part-of: rdev
rdev.orchard9.ai/role: worker
spec:
containers:
- name: claudebox
image: ghcr.io/orchard9/rdev-claudebox:v0.3.0
imagePullPolicy: Always
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "2"
memory: "4Gi"
volumeMounts:
# Workspace for projects
- name: workspace
mountPath: /workspace
# Claude config directory (persistent for auth)
- name: claude-config
mountPath: /root/.claude
# Simple liveness check - container is running
livenessProbe:
exec:
command:
- cat
- /healthcheck.sh
initialDelaySeconds: 5
periodSeconds: 60
# Readiness - claude CLI is available
readinessProbe:
exec:
command:
- claude
- --version
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 10
volumes:
- name: workspace
persistentVolumeClaim:
claimName: claudebox-workspace
- name: claude-config
persistentVolumeClaim:
claimName: claudebox-claude-config
# Pull from GitHub Container Registry
imagePullSecrets:
- name: ghcr-secret
---
# Headless service for StatefulSet
apiVersion: v1
kind: Service
metadata:
name: claudebox
namespace: rdev
labels:
app.kubernetes.io/name: claudebox
app.kubernetes.io/part-of: rdev
spec:
clusterIP: None
selector:
app: claudebox
ports:
- port: 8080
name: http