Skip to content
4 changes: 2 additions & 2 deletions charts/supabase/templates/db/storage.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.db.enabled -}}
{{- if .Values.db.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
Expand All @@ -17,5 +18,4 @@ spec:
requests:
storage: {{ .Values.db.storage.size }}
{{- end }}


{{- end }}
10 changes: 5 additions & 5 deletions charts/supabase/templates/kong/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ metadata:
data:
{{- toYaml .Values.kong.environment | nindent 2 }}
wrapper.sh: |
#!/bin/sh
#!/bin/bash

set -euo pipefail

echo "Replacing env placeholders of /home/kong/kong.yml"
echo "Replacing env placeholders of /usr/local/kong/kong.yml"

sed \
-e "s/\${SUPABASE_ANON_KEY}/${SUPABASE_ANON_KEY}/" \
-e "s/\${SUPABASE_SERVICE_KEY}/${SUPABASE_SERVICE_KEY}/" \
/home/kong/template.yml \
> /home/kong/kong.yml
/usr/local/kong/template.yml \
> /usr/local/kong/kong.yml

exec /docker-entrypoint.sh kong docker-start
{{- if .Values.kong.config -}}
Expand Down Expand Up @@ -162,4 +162,4 @@ data:
allow:
- admin
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/supabase/templates/kong/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
{{- toYaml .Values.kong.securityContext | nindent 12 }}
image: "{{ .Values.kong.image.repository }}:{{ .Values.kong.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.kong.image.pullPolicy }}
command: ["/bin/sh"]
command: ["/bin/bash"]
args: ["/scripts/wrapper.sh"]
env:
{{- range $key, $value := .Values.kong.environment }}
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /home/kong/template.yml
- mountPath: /usr/local/kong/template.yml
name: config
subPath: template.yml
- mountPath: /scripts
Expand Down Expand Up @@ -101,4 +101,4 @@ spec:
{{- with .Values.kong.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/supabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ kong:
port: 8000
environment:
KONG_DATABASE: "off"
KONG_DECLARATIVE_CONFIG: /home/kong/kong.yml
KONG_DECLARATIVE_CONFIG: /usr/local/kong/kong.yml
# https://github.com/supabase/cli/issues/14
KONG_DNS_ORDER: LAST,A,CNAME
KONG_PLUGINS: request-transformer,cors,key-auth,acl
Expand Down Expand Up @@ -869,4 +869,4 @@ kong:
# config:
# hide_groups_header: true
# allow:
# - admin
# - admin