gobackup / gobackup/gobackup-operator
[Restore] Restore CRD + RestoreReconciler (PostgreSQL + S3)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Part of #81. Depends on #92.
Summary
Add a Restore CRD and RestoreReconciler that orchestrate the gobackup-restore runner (#92) as a Kubernetes Job, giving single-manifest restores with full status and logging. PostgreSQL + S3 only.
Scope
RestoreCRD (api/v1alpha1/restore_types.go): source backup ref (inherits storage credentials + compression/encoding), selection mode (latest|timestamp|filename), target Database ref,overwriteflag (defaultfalse).RestoreReconciler(internal/controller/restore_controller.go): validate source/target, render the runner config Secret (reusepkg/gobackupconfig), build and own abatch/v1 Jobfrom the runner image, watch the Job → surface status.- Status mirrors
Backup: phase, start/completion time, conditions, last-100-lines logs on failure. - Register in
cmd/main.go; RBAC markers; CRD manifests + hand-sync to the Helm chart; sample manifests.
Out of scope
- Non-Postgres engines / non-S3 backends → support-matrix issue.
Acceptance criteria
- Applying a single
Restoremanifest restores a Postgres DB from an S3 backup, with phase / conditions / logs reflected in status. - Overwrite guard enforced; invalid source/target rejected with a clear condition.
- envtest coverage for the reconciler; e2e restores a real backup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read api/v1alpha1/restore_types.go and internal/controller/restore_controller.go alongside the existing Backup implementation, then inspect runner #92 and pkg/gobackupconfig. Check cmd/main.go, RBAC markers, CRD and Helm manifests, sample manifests, and the requested envtest/e2e coverage. Done means a single Restore manifest restores PostgreSQL from S3 and reports phase, conditions, and failure logs while enforcing validation and overwrite protection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, kubernetes, postgresql
- Domain
- databases, devops, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100