diff --git a/kubernetes/apps/immich/seed-job.yaml b/kubernetes/apps/immich/seed-job.yaml index eaf564af..97e3f952 100644 --- a/kubernetes/apps/immich/seed-job.yaml +++ b/kubernetes/apps/immich/seed-job.yaml @@ -170,6 +170,16 @@ spec: psql -U postgres -d "$TARGET_DB" -c "CREATE EXTENSION IF NOT EXISTS \"$ext\" CASCADE;" || log "extension $ext: failed (continuing)" done + # vectors / vchord extensions create their own schemas owned by + # postgres. pg_restore runs under SET ROLE $TARGET_OWNER, which + # then can't even reference vectors.vector(...) as a column type + # without USAGE on the schema. Grant USAGE+CREATE so the dump's + # CREATE TABLE face_search/smart_search succeeds. + for sch in vectors vchord; do + log "Granting access to schema $sch to $TARGET_OWNER" + psql -U postgres -d "$TARGET_DB" -c "GRANT USAGE, CREATE ON SCHEMA \"$sch\" TO \"$TARGET_OWNER\";" || log "grant on $sch: failed (continuing)" + done + log "pg_restore /seed/legacy.dump → $TARGET_DB ..." pg_restore -U postgres -d "$TARGET_DB" \ --no-owner --no-privileges --role="$TARGET_OWNER" \ diff --git a/kubernetes/bootstrap.sh b/kubernetes/bootstrap.sh index 9c0138d3..44a2b93b 100755 --- a/kubernetes/bootstrap.sh +++ b/kubernetes/bootstrap.sh @@ -300,7 +300,10 @@ if phase_runs wait-apps; then # cluster's bootstrap.recovery succeeding from that seed. Allow 20 min. wait_kustomization authentik "Authentik" 120 wait_kustomization monitoring "kube-prometheus-stack (Loki + Prom + AM + Grafana)" 180 - wait_kustomization music-assistant "Music Assistant (small Garage tarball)" 60 + # On cold-start, velero-bootstrap-restore takes ~15min before this KS + # can even start reconciling, so the wait timer can burn most of its + # budget on the dependency. 30min covers that + the actual reconcile. + wait_kustomization music-assistant "Music Assistant (small Garage tarball)" 180 wait_kustomization paperless "Paperless (DB + ~3.5GB media Velero restore)" 180 wait_kustomization home-assistant "Home Assistant (HAOS backup → native restore)" 180 # Measured ~70 min on a 70 GB library (17 min upload + 52 min extract).