fix: make the database disk image 6 GB instead of 2 GB (#15)
This commit was merged in pull request #15.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# supaspin
|
||||
|
||||
Version 1.6.3
|
||||
Version 1.6.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.
|
||||
@@ -16,7 +16,7 @@ endangering them. Nothing in it is specific to any one app.
|
||||
| Web API | `https://<slot hostname>` (auth, rest, graphql, realtime, storage, functions); the certificate is from Let's Encrypt when that is enabled, otherwise self-signed |
|
||||
| Postgres | `<LAN IP>:544N` (instance 1 → 5441, 2 → 5442, …); which addresses listen is set by **Port bind** |
|
||||
| Studio (admin UI) | `http://<LAN IP>:300N` (3001, 3002, …), not on the public hostname |
|
||||
| Disk | fixed-size ext4 image files, mounted at boot: **db 2 GB, storage 1 GB, every other volume 256 MB** |
|
||||
| Disk | fixed-size ext4 image files, mounted at boot: **db 6 GB, storage 1 GB, every other volume 256 MB** |
|
||||
| Memory | limits add up to **9 GiB** per instance, requests to 1.875 GiB (table below) |
|
||||
| Priority | pods run at priority -100 (`supaspin-low`); when the server runs short of memory they are evicted first and never evict anyone else |
|
||||
| Secrets | generated fresh per instance: JWT secret, anon and service keys, Postgres password, Studio password, and the internal keys |
|
||||
|
||||
@@ -39,7 +39,7 @@ import tty
|
||||
|
||||
import yaml
|
||||
|
||||
VERSION = "1.6.3"
|
||||
VERSION = "1.6.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"
|
||||
@@ -53,7 +53,10 @@ CERTS_NS = "supaspin-certs"
|
||||
|
||||
# Image cap per volume, in MiB. The chart's separate imgproxy volume is not used: imgproxy has to
|
||||
# read the uploaded files, so it mounts the storage volume instead (see instance_values).
|
||||
VOLUMES = {"db": 2048, "storage": 1024, "functions": 256,
|
||||
# The db image is 6 GB because of the analytics logs: browser-test traffic wrote about 1.2 GB of
|
||||
# logs a day on instance 2 (2026-10-14), the nightly cleanup keeps LOG_RETENTION of them, and the
|
||||
# write-ahead log may take up to 1 GB on top. That peaks near 4.5 GB; 2 GB filled up on instance 4.
|
||||
VOLUMES = {"db": 6144, "storage": 1024, "functions": 256,
|
||||
"snippets": 256, "deno": 256, "pgsodium": 256}
|
||||
# The user Postgres runs as inside supabase/postgres 17.6.1.136 (`id postgres` in the image).
|
||||
# Production's older image used 2000; do not copy that number.
|
||||
|
||||
@@ -143,7 +143,7 @@ class Values(unittest.TestCase):
|
||||
|
||||
def test_volume_caps(self):
|
||||
p = self.v["persistence"]
|
||||
self.assertEqual(p["db"]["size"], "2048Mi")
|
||||
self.assertEqual(p["db"]["size"], "6144Mi")
|
||||
self.assertEqual(p["storage"]["size"], "1024Mi")
|
||||
for vol in ("functions", "snippets", "deno", "pgsodium"):
|
||||
self.assertEqual(p[vol]["size"], "256Mi")
|
||||
@@ -478,7 +478,7 @@ class Manifests(unittest.TestCase):
|
||||
pv = sp.pv_manifest(CFG, 2, "db")
|
||||
self.assertEqual(pv["spec"]["claimRef"], {"namespace": "supaspin-2", "name": "supa2-supabase-db"})
|
||||
self.assertEqual(pv["spec"]["local"]["path"], "/data/supabase/2/db/data")
|
||||
self.assertEqual(pv["spec"]["capacity"]["storage"], "2048Mi")
|
||||
self.assertEqual(pv["spec"]["capacity"]["storage"], "6144Mi")
|
||||
self.assertEqual(pv["spec"]["persistentVolumeReclaimPolicy"], "Retain")
|
||||
self.assertEqual(pv["spec"]["nodeAffinity"]["required"]["nodeSelectorTerms"][0]
|
||||
["matchExpressions"][0]["values"], ["node1"])
|
||||
|
||||
Reference in New Issue
Block a user