fix: run the log-retention SQL in the postgres database #11

Merged
igor merged 1 commits from fix/log-retention-run-in-postgres into main 2026-10-06 17:35:54 +00:00
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# supaspin
Version 1.3.3
Version 1.3.4
Create, list, show and delete throwaway [Supabase](https://supabase.com) instances on a
single-node [microk8s](https://microk8s.io) server, from a terminal menu.
+1 -1
View File
@@ -1 +1 @@
1.3.3
1.3.4
+2 -2
View File
@@ -39,7 +39,7 @@ import tty
import yaml
VERSION = "1.3.3"
VERSION = "1.3.4"
CONFIG_PATH = os.environ.get("SUPASPIN_CONFIG", "/etc/supaspin/config.yaml")
STATE_DIR = os.environ.get("SUPASPIN_STATE", "/var/lib/supaspin")
CHART_REPO = "https://supabase-community.github.io/supabase-kubernetes"
@@ -820,7 +820,7 @@ def setup_log_retention(cfg, n, log):
scheduling under a fixed job name makes it idempotent."""
log(f" log retention: deleting analytics logs older than {LOG_RETENTION}, every night")
kubectl("-n", namespace(n), "exec", f"{fullname(n)}-db-0", "-c", "supabase-db", "--",
"psql", "-U", "supabase_admin", "-d", "_supabase", "-v", "ON_ERROR_STOP=1",
"psql", "-U", "supabase_admin", "-d", "postgres", "-v", "ON_ERROR_STOP=1",
"-c", RETENTION_SQL)
log(" log retention is set")