Merge pull request 'fix: run the log-retention SQL in the postgres database' (#11) from fix/log-retention-run-in-postgres into main
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# supaspin
|
# supaspin
|
||||||
|
|
||||||
Version 1.3.3
|
Version 1.3.4
|
||||||
|
|
||||||
Create, list, show and delete throwaway [Supabase](https://supabase.com) instances on a
|
Create, list, show and delete throwaway [Supabase](https://supabase.com) instances on a
|
||||||
single-node [microk8s](https://microk8s.io) server, from a terminal menu.
|
single-node [microk8s](https://microk8s.io) server, from a terminal menu.
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import tty
|
|||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
VERSION = "1.3.3"
|
VERSION = "1.3.4"
|
||||||
CONFIG_PATH = os.environ.get("SUPASPIN_CONFIG", "/etc/supaspin/config.yaml")
|
CONFIG_PATH = os.environ.get("SUPASPIN_CONFIG", "/etc/supaspin/config.yaml")
|
||||||
STATE_DIR = os.environ.get("SUPASPIN_STATE", "/var/lib/supaspin")
|
STATE_DIR = os.environ.get("SUPASPIN_STATE", "/var/lib/supaspin")
|
||||||
CHART_REPO = "https://supabase-community.github.io/supabase-kubernetes"
|
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."""
|
scheduling under a fixed job name makes it idempotent."""
|
||||||
log(f" log retention: deleting analytics logs older than {LOG_RETENTION}, every night")
|
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", "--",
|
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)
|
"-c", RETENTION_SQL)
|
||||||
log(" log retention is set")
|
log(" log retention is set")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user