Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

Commit

Permalink
Replaces DB_ENC_KEY with JWT_SECRET
Browse files Browse the repository at this point in the history
  • Loading branch information
CollectiveUnicorn committed Aug 7, 2024
1 parent b7cb54c commit 27b96e3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/supabase/bitnami-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ realtime:
secretKeyRef:
name: supabase-postgresql
key: postgres-password
- name: DB_ENC_KEY
value: "testenckeychange" # This needs to be exactly 16 characters
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: '{{ include "supabase.jwt.secretName" . }}'
key: '{{ include "supabase.realtime.secretKey" . }}'
command:
- sh
- -c
Expand All @@ -109,7 +112,7 @@ realtime:
sleep 5;
done;
echo "supabase-realtime is ready. Running curl command...";
if curl --insecure -L -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $SUPABASE_SERVICE_KEY" -H "apiKey: $SUPABASE_SERVICE_KEY" -d '{"tenant":{"name":"supabase-realtime","external_id":"supabase-realtime","jwt_secret":"'"$DB_ENC_KEY"'","extensions":[{"type":"postgres_cdc_rls","settings":{"db_name":"postgres","db_host":"supabase-postgresql","db_user":"supabase_admin","db_password":"'"$POSTGRESQL_PASSWORD"'","db_port":"5432","region":"us-east-1","publication":"supabase_realtime","ssl_enforced":"false","poll_interval_ms":"100","poll_max_record_bytes":"1048576"}}],"notify_private_alpha":"true"}}' https://supabase-kong.leapfrogai.svc.cluster.local/realtime/v1/api/tenants; then
if curl --insecure -L -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $SUPABASE_SERVICE_KEY" -H "apiKey: $SUPABASE_SERVICE_KEY" -d '{"tenant":{"name":"supabase-realtime","external_id":"supabase-realtime","jwt_secret":"'"$JWT_SECRET"'","extensions":[{"type":"postgres_cdc_rls","settings":{"db_name":"postgres","db_host":"supabase-postgresql","db_user":"supabase_admin","db_password":"'"$POSTGRESQL_PASSWORD"'","db_port":"5432","region":"us-east-1","publication":"supabase_realtime","ssl_enforced":"false","poll_interval_ms":"100","poll_max_record_bytes":"1048576"}}],"notify_private_alpha":"true"}}' https://supabase-kong.leapfrogai.svc.cluster.local/realtime/v1/api/tenants; then
echo "Curl command completed successfully. Entering sleep loop..."
while true; do
sleep 3600
Expand Down

0 comments on commit 27b96e3

Please sign in to comment.