mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 15:04:31 +00:00
chore: improve error logging and extend StorageClass validation
- Redirected error messages in `deploy.sh` and `render_supabase.py` to `stderr` for better logging clarity. - Extended allowed prefixes for Supabase StorageClass to include `pd-standard`.
This commit is contained in:
parent
0f68c4ddfe
commit
5ebe4d6c06
@ -22,7 +22,7 @@ import json
|
|||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
def die(msg):
|
def die(msg):
|
||||||
print(f"ERROR: {msg}")
|
print(f"ERROR: {msg}", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
c = configparser.ConfigParser()
|
c = configparser.ConfigParser()
|
||||||
@ -51,7 +51,7 @@ try:
|
|||||||
if disk_type != "pd-standard":
|
if disk_type != "pd-standard":
|
||||||
die(f"storage-class configuration error: StorageClass '{sc_name}' must use parameters.type 'pd-standard', but uses '{disk_type}'.")
|
die(f"storage-class configuration error: StorageClass '{sc_name}' must use parameters.type 'pd-standard', but uses '{disk_type}'.")
|
||||||
|
|
||||||
print(f"Verified live Supabase StorageClass '{sc_name}' (type: {disk_type}).")
|
print(f"Verified live Supabase StorageClass '{sc_name}' (type: {disk_type}).", file=sys.stderr)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
die(f"storage-class configuration error: Required StorageClass '{sc_name}' does not exist on cluster '{ctx}'.")
|
die(f"storage-class configuration error: Required StorageClass '{sc_name}' does not exist on cluster '{ctx}'.")
|
||||||
PY
|
PY
|
||||||
|
|||||||
@ -131,7 +131,7 @@ warn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
echo "==> $*"
|
echo "==> $*" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
write_split_supabase_values() {
|
write_split_supabase_values() {
|
||||||
|
|||||||
@ -931,7 +931,7 @@ def _build_overlay(cfg: configparser.ConfigParser, args: argparse.Namespace) ->
|
|||||||
|
|
||||||
if supabase_storage_class:
|
if supabase_storage_class:
|
||||||
# Validate: must be a synology/merlin/gke mount — refuse pi/local SD card classes
|
# Validate: must be a synology/merlin/gke mount — refuse pi/local SD card classes
|
||||||
allowed_prefixes = ("synology", "merlin-local-iscsi", "myrddin-local-iscsi", "supabase-gke", "supabase-standard")
|
allowed_prefixes = ("synology", "merlin-local-iscsi", "myrddin-local-iscsi", "supabase-gke", "supabase-standard", "pd-standard")
|
||||||
if not any(supabase_storage_class.startswith(p) for p in allowed_prefixes):
|
if not any(supabase_storage_class.startswith(p) for p in allowed_prefixes):
|
||||||
raise SystemExit(
|
raise SystemExit(
|
||||||
f"SUPABASE_STORAGE_CLASS '{supabase_storage_class}' is not a synology or GKE CSI mount. "
|
f"SUPABASE_STORAGE_CLASS '{supabase_storage_class}' is not a synology or GKE CSI mount. "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user