Scalable and distributed custom feed generator, ott - on that topic

Make db work in k8s (sort of)

Changed files
+8 -1
crates
helm
ott
templates
+1 -1
crates/ott-db-migration/migrations/003_configure_pgpartman.sql
··· 2 2 3 3 -- Configure pg_partman for the table 4 4 SELECT create_parent( 5 - p_parent_table => 'vectors', 5 + p_parent_table => 'public.vectors', 6 6 p_control => 'created_at', 7 7 p_interval => '30 minutes', 8 8 p_type => 'range',
+2
crates/ott-db-migration/migrations/005_grant_access_to_vec_table.sql
··· 1 + GRANT ALL PRIVILEGES ON TABLE public.vectors TO app; 2 + GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO app;
+5
helm/ott/templates/pg_migration.yaml
··· 28 28 key: password 29 29 - name: DATABASE_URL 30 30 value: "postgres://$(DATABASE_USER):$(DATABASE_PASSWORD)@postgres-rw.default.svc.cluster.local:5432/app" 31 + - name: POSTGRES_URL 32 + value: "postgres://$(DATABASE_USER):$(DATABASE_PASSWORD)@postgres-rw.default.svc.cluster.local:5432/postgres" 31 33 command: 32 34 - /bin/sh 33 35 - -c ··· 41 43 echo "Attempt $i/30: Database not ready yet, waiting..." 42 44 sleep 10 43 45 done 46 + 47 + echo "Making sure extensions are installed" 48 + psql "$POSTGRES_URL" -c "CREATE EXTENSION IF NOT EXISTS pg_cron;" 44 49 45 50 echo "Setting up migration" 46 51 ./app