Initial scaffold: API service, K8s operator, and CRDs

Forgebot is a K8s operator + API service for dispatching AI agent
jobs from git forge commands. Includes:

- CRDs: AgentPool, AgentTask, ProviderQueue, RepositoryBinding
- API server with webhook handler, task queue, and comment proxy
- Operator controllers for task scheduling and job management
- Gitea provider with webhook parsing and signature verification
- PostgreSQL database with auto-migration
- Woodpecker CI pipelines and multi-stage Dockerfiles
This commit is contained in:
2026-06-08 22:49:18 +10:00
parent fd1a4956ed
commit 49d514c050
46 changed files with 3139 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
---
apiVersion: forgebot.unkin.net/v1alpha1
kind: AgentPool
metadata:
name: default-pool
namespace: forgebot
spec:
model: claude-sonnet-4-20250514
endpoint: https://litellm.k8s.syd1.au.unkin.net
maxConcurrent: 3
image: git.unkin.net/unkin/agent-dev:latest
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "2"
memory: 4Gi
credentialSecretRef:
name: litellm-api-key
serviceAccountName: forgebot-agent
+17
View File
@@ -0,0 +1,17 @@
---
apiVersion: forgebot.unkin.net/v1alpha1
kind: AgentTask
metadata:
name: example-review
namespace: forgebot
spec:
poolRef: default-pool
command: review
skill: review
repository: unkin/artifactapi
ref: refs/pull/42/head
context:
prNumber: 42
commentID: 12345
body: "/review check for security issues"
author: unkinben
+12
View File
@@ -0,0 +1,12 @@
---
apiVersion: forgebot.unkin.net/v1alpha1
kind: ProviderQueue
metadata:
name: gitea-queue
namespace: forgebot
spec:
provider: gitea
endpoint: http://forgebot-api.forgebot.svc.cluster.local/api/v1
pollInterval: 30s
credentialSecretRef:
name: forgebot-api-token
+29
View File
@@ -0,0 +1,29 @@
---
apiVersion: forgebot.unkin.net/v1alpha1
kind: RepositoryBinding
metadata:
name: artifactapi
namespace: forgebot
spec:
repository: unkin/artifactapi
providerQueueRef: gitea-queue
agentPoolRef: default-pool
allowedUsers:
- unkinben
allowedCommands:
- plan
- review
- implement
- test
- fix
skillMapping:
- command: plan
skill: plan
- command: review
skill: review
- command: implement
skill: implement
- command: test
skill: test
- command: fix
skill: fix