• v0.11.0 — postgres instead of sqlite
    CI / test (push) Successful in 5s
    CI / chart (push) Successful in 1s
    CI / security (push) Successful in 12s
    Release / test (push) Failing after 4s
    Release / binaries (push) Has been skipped
    Release / image (push) Has been skipped
    Release / chart (push) Has been skipped
    Release / scan-image (push) Has been skipped

    niklas released this 2026-09-20 09:11:36 +00:00

    The server now stores everything in Postgres and keeps nothing on disk.
    TERDUT_DB_DSN replaces TERDUT_DB_PATH and is required: there is no sensible
    default for a connection string, and a server that silently came up against
    the wrong database would be worse than one that refuses to start. The DSN
    carries no password — pgx fills in from libpq's PG* variables whatever the
    DSN omits, so PGPASSWORD supplies it and the credential stays out of the
    rendered manifest.

    This is the first step of the multi-tenancy work (#1, #2). It comes first
    because teams add a column to nearly every table, and writing those
    migrations twice, once per database, is work nobody gets paid for.

    Upgrading is a one-way, offline step. An existing SQLite database does
    not migrate itself: stop the old version, let the new binary build the
    schema against an empty database, run scripts/sqlite-to-postgres.go, then
    start it for good. README §"Upgrading from SQLite" has the commands. The
    copy preserves every id, so incidents keep their numbers and the timeline,
    alert membership, outbox and acknowledgement tokens still point where they
    did; it refuses a target that already has rows, so a second run cannot
    double-insert. Going back means restoring the SQLite file — a v0.10.2
    binary cannot read Postgres, and anything written after the cutover would
    be lost.

    The ten SQLite migrations are replaced by one Postgres baseline. They only
    ever described how this schema was reached, and 008's backfill rewrote data
    a Postgres install never had. The history stays in git.

    One behavioural fix rides along: dead man's switches were silently broken
    on Postgres by a SQLite habit of summing booleans, and are not on the
    released code — it is the sweeper, which only logs, so it would have failed
    quietly. Timestamp arithmetic also moved to FLOOR rather than a rounding
    cast, so a row written late in a second no longer claims a time one second
    ahead of the Go side.

    Requires no new version of terdut-tui, and excludes none: the HTTP API,
    its routes, its payloads and both authentication schemes are byte-for-byte
    unchanged, and so is the Alertmanager webhook. The ntfy path, the
    Acknowledge button and its token TTL are untouched.

    The chart loses the PVC, the data volume and the python backup sidecar, and
    requires database.dsn. Backups move to where Postgres runs, as a pg_dump
    through k8up rather than a sqlite3 dump beside the app. The route, the
    listener and the resource ceilings are unchanged; the network policy lives
    in the wrapper chart and gains only the postgres-operator ingress there.

    Downloads