feat(api): expose async backup/restore job status (fixes #7)

Backup and restore only enqueue a cluster Job; a later failure left its
only trace in that Job object, invisible without kubectl. Add
GET /api/v1/servers/{name}/jobs (owner-or-admin) projecting the newest
20 managed Jobs (felis-backup / felis-restore) as
running|succeeded|failed with message and timestamps. Nil reader -> 503
jobs_unavailable, mirroring the backup/restore feature gates. RBAC gains
jobs:list; OpenAPI parity updated.
This commit is contained in:
Lemon-miaow committed 2026-09-22 20:36:36 +08:00
1 parent a2df2f242b
commit ff7c57cf9c
8 files changed
+365 -2

No files matched your search

+1
View File
@@ -259,6 +259,7 @@ func cmdAPI(args []string, stdout, stderr io.Writer) int {
Builder: builder,
Restorer: restorer,
Backuper: backuper,
JobStatus: api.NewK8sJobStatus(cl, cfg.K8s.Namespace),
Files: files,
Submissions: submissions,
Mailer: mailer,