Migrate Woodpecker CI from SQLite to Postgres (CNPG) #28
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-2026-02-26-tf-modularize-postgres→ new phaseRepo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want Woodpecker CI to use Postgres instead of SQLite
So that CI logs are reliably retrievable and we eliminate SQLite from the stack
Context
Woodpecker uses SQLite by default. The K8s backend has a known log streaming bug (upstream #4409) where
queue.Done: cannot ack workflowandstream: not foundcause ALL pipeline logs to be empty at the API layer. Logs ARE stored in SQLite but can't be retrieved via API/UI. Affects all repos platform-wide. SQLite should not be on our stack — we have CNPG.File Targets
Files the agent should modify:
terraform/main.tf-- add WOODPECKER_DATABASE_DRIVER and WOODPECKER_DATABASE_DATASOURCE env vars to server configFiles the agent should NOT touch:
Acceptance Criteria
tofu planshows only Woodpecker helm_release changesTest Expectations
queue.Done: cannot ack workflowerrors are gone from server logskubectl logs woodpecker-server-0 -n woodpecker --tail=20Constraints
woodpeckerdatabase in existing CNPG cluster-target=helm_release.woodpeckerfor isolated applyChecklist
Related
plan-2026-02-26-tf-modularize-postgres-- shared Postgres planUpdated approach (2026-03-14)
Original issue says "create woodpecker database in existing CNPG cluster." Updated plan creates a separate CNPG Cluster in
woodpeckernamespace for isolation:kubernetes_manifestinterraform/main.tfwoodpeckernamespace (reuses same MinIO IAM user)WOODPECKER_DATABASE_DRIVER=postgres+ datasourcewoodpecker_db_passwordvariable + CI secretRollback: remove DB env vars → Woodpecker falls back to SQLite PVC.