apiVersion: apps/v1 kind: Deployment metadata: name: acb-api namespace: ai-code-battle labels: app.kubernetes.io/name: acb-api app.kubernetes.io/part-of: ai-code-battle app.kubernetes.io/component: api spec: replicas: 2 selector: matchLabels: app.kubernetes.io/name: acb-api template: metadata: labels: app.kubernetes.io/name: acb-api app.kubernetes.io/part-of: ai-code-battle app.kubernetes.io/component: api spec: containers: - name: api image: forgejo.ardenone.com/ai-code-battle/acb-api:latest env: - name: ACB_LISTEN_ADDR value: ":8080" - name: ACB_DATABASE_URL valueFrom: secretKeyRef: name: acb-postgres-credentials key: database-url - name: ACB_VALKEY_ADDR value: "valkey-master.valkey.svc.cluster.local:6379" - name: ACB_VALKEY_PASSWORD valueFrom: secretKeyRef: name: acb-valkey-credentials key: password - name: ACB_WORKER_API_KEY valueFrom: secretKeyRef: name: acb-api-key key: api-key - name: ACB_ENCRYPTION_KEY valueFrom: secretKeyRef: name: acb-encryption-key key: key ports: - name: http containerPort: 8080 protocol: TCP livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 30 readinessProbe: httpGet: path: /ready port: http initialDelaySeconds: 5 periodSeconds: 10 resources: requests: cpu: 100m memory: 128Mi limits: memory: 256Mi restartPolicy: Always