supabase-community / supabase-kubernetes

Helm 3 charts to deploy a Supabase on Kubernetes
Apache License 2.0
433 stars 117 forks source link

Kong configuration for functions-v1-all is hardcoded #88

Open guivin opened 3 days ago

guivin commented 3 days ago

Bug report

Describe the bug

The url used in the Kong configuration for functions-v1-all is hardcoded in charts/supabase/templates/kong/config.yaml :

url: http://functions:{{ .Values.functions.service.port }}/

Should be :

 url: http://{{ include "supabase.functions.fullname" . }}:{{ .Values.functions.service.port }}/

To Reproduce

  1. Deploy the Helm with a name other than functions for the edge-function.
  2. Request you function through the Kong gateway : curl -X POST http://$IP:$PORT/functions/v1/ping
  3. Looking the Kong logs you will have a DNS resolution error meaning that the Kong gateway cannot find the functions

Set functions.fullnameOverride to functions in the values.yaml fixes temporary the issue.

Expected behavior

The internal DNS name of the functions should be dynamic to support prefixed resources by Helm

joeldomke commented 3 days ago

This seems to be a duplicate of #61