Create deploy/k8s/ directory with complete K8s manifests for the ai-code-battle namespace on apexalgo-iad cluster: - Namespace and ArgoCD Application (auto-sync, prune, self-heal) - Match worker Deployment (2 replicas, metrics on :9090) - Index builder Deployment (Recreate strategy) - 6 strategy bot Deployments (random, gatherer, rusher, guardian, swarm, hunter) - ClusterIP Services for all bots (cluster DNS resolution) - SealedSecret templates (API key, R2 creds, bot secrets, Cloudflare token) - All containers from forgejo.ardenone.com/ai-code-battle/ registry - Health/readiness probes and resource limits on all deployments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: acb-worker
|
|
namespace: ai-code-battle
|
|
labels:
|
|
app.kubernetes.io/name: acb-worker
|
|
app.kubernetes.io/part-of: ai-code-battle
|
|
app.kubernetes.io/component: worker
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: acb-worker
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: acb-worker
|
|
app.kubernetes.io/part-of: ai-code-battle
|
|
app.kubernetes.io/component: worker
|
|
spec:
|
|
containers:
|
|
- name: worker
|
|
image: forgejo.ardenone.com/ai-code-battle/acb-worker:latest
|
|
args:
|
|
- "-poll=5s"
|
|
- "-heartbeat=30s"
|
|
- "-timeout=3s"
|
|
env:
|
|
- name: ACB_API_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: acb-api-key
|
|
key: api-endpoint
|
|
- name: ACB_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: acb-api-key
|
|
key: api-key
|
|
- name: ACB_R2_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: acb-r2-credentials
|
|
key: endpoint
|
|
- name: ACB_R2_BUCKET
|
|
value: "acb-data"
|
|
- name: ACB_R2_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: acb-r2-credentials
|
|
key: access-key
|
|
- name: ACB_R2_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: acb-r2-credentials
|
|
key: secret-key
|
|
- name: ACB_METRICS_ADDR
|
|
value: ":9090"
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 9090
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: metrics
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: metrics
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 512Mi
|
|
restartPolicy: Always
|