Skip to content

Add Litestream backup sidecar to existing StatefulSet #229

@vcarl

Description

@vcarl

Context

Part of load balancer architecture work (see PR #228 for full analysis).

Risk: Low | Reward: High | Code Changes: None

Description

Add Litestream sidecar to the existing StatefulSet for continuous SQLite backup to DigitalOcean Spaces.

Why This is Safe

  • Read-only operation on SQLite (uses WAL mode)
  • Doesn't affect app behavior
  • Provides disaster recovery immediately
  • Easiest rollback: just remove the sidecar

Tasks

  • Create DigitalOcean Spaces bucket for backups
  • Add Litestream credentials to modbot-env secret:
    • LITESTREAM_ACCESS_KEY_ID
    • LITESTREAM_SECRET_ACCESS_KEY
  • Create cluster/litestream-config.yaml ConfigMap with DO Spaces endpoint
  • Add Litestream sidecar container to cluster/deployment.yaml
  • Test backup/restore in staging

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions