Skip to content

Commit c78ded6

Browse files
committed
Make cleaner values.js WIP
1 parent 0ca2ee9 commit c78ded6

File tree

11 files changed

+213
-183
lines changed

11 files changed

+213
-183
lines changed

build.sh

100644100755
File mode changed.

build/supabase-0.0.1.tgz

53 KB
Binary file not shown.

charts/supabase/.DS_Store

-6 KB
Binary file not shown.

charts/supabase/charts/.DS_Store

-6 KB
Binary file not shown.

charts/supabase/templates/auth/config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ metadata:
55
labels:
66
{{- include "supabase.labels" . | nindent 4 }}
77
data:
8+
GOTRUE_DB_DATABASE_URL: postgres://postgres:{{ .Values.db_password }}@{{ template "common.names.fullname" .Subcharts.database }}.{{ .Release.Namespace }}.svc.cluster.local:5432/postgres?search_path=auth
9+
GOTRUE_JWT_SECRET: {{ .Values.jwt_secret | quote }}
810
{{- toYaml .Values.auth.environment | nindent 2 }}
+141-136
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,156 @@
1-
{{- if .Values.kong.enable -}}
2-
apiVersion: v1
3-
kind: ConfigMap
4-
metadata:
5-
name: {{ include "supabase.kong.fullname" . }}
6-
labels:
7-
{{- include "supabase.labels" . | nindent 4 }}
8-
data:
9-
{{- toYaml .Values.kong.environment | nindent 2 }}
10-
{{- if .Values.kong.config -}}
11-
kong.yml:
12-
{{- toYaml .Values.kong.config | nindent 4 }}
13-
{{- else }}
14-
kong.yml: >-
15-
_format_version: "1.1"
1+
{{- define "supabase.kong-config" }}
2+
_format_version: "1.1"
163

17-
consumers:
18-
- username: anon
19-
keyauth_credentials:
20-
- key: {{ .Values.kong.credentials.anonKey }}
21-
- username: service_role
22-
keyauth_credentials:
23-
- key: {{ .Values.kong.credentials.serviceRoleKey }}
4+
consumers:
5+
- username: anon
6+
keyauth_credentials:
7+
- key: {{ .Values.kong.credentials.anonKey }}
8+
- username: service_role
9+
keyauth_credentials:
10+
- key: {{ .Values.kong.credentials.serviceRoleKey }}
2411

25-
acls:
26-
- consumer: anon
27-
group: anon
28-
- consumer: service_role
29-
group: admin
12+
acls:
13+
- consumer: anon
14+
group: anon
15+
- consumer: service_role
16+
group: admin
3017

31-
services:
18+
services:
19+
{{- if .Values.kong.extraServices }}
20+
{{- toYaml .Values.kong.extraServices | nindent 2 }}
21+
{{- end }}
22+
- name: auth-v1-open
23+
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/verify
24+
routes:
3225
- name: auth-v1-open
33-
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/verify
34-
routes:
35-
- name: auth-v1-open
36-
strip_path: true
37-
paths:
38-
- /auth/v1/verify
39-
plugins:
40-
- name: cors
26+
strip_path: true
27+
paths:
28+
- /auth/v1/verify
29+
plugins:
30+
- name: cors
31+
- name: auth-v1-open-callback
32+
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/callback
33+
routes:
4134
- name: auth-v1-open-callback
42-
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/callback
43-
routes:
44-
- name: auth-v1-open-callback
45-
strip_path: true
46-
paths:
47-
- /auth/v1/callback
48-
plugins:
49-
- name: cors
35+
strip_path: true
36+
paths:
37+
- /auth/v1/callback
38+
plugins:
39+
- name: cors
40+
- name: auth-v1-open-authorize
41+
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/authorize
42+
routes:
5043
- name: auth-v1-open-authorize
51-
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/authorize
52-
routes:
53-
- name: auth-v1-open-authorize
54-
strip_path: true
55-
paths:
56-
- /auth/v1/authorize
57-
plugins:
58-
- name: cors
44+
strip_path: true
45+
paths:
46+
- /auth/v1/authorize
47+
plugins:
48+
- name: cors
5949

6050

61-
- name: auth-v1
62-
_comment: "GoTrue: /auth/v1/* -> http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/*"
63-
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999
64-
routes:
65-
- name: auth-v1-all
66-
strip_path: true
67-
paths:
68-
- /auth/v1/
69-
plugins:
70-
- name: cors
71-
- name: key-auth
72-
config:
73-
hide_credentials: false
74-
- name: acl
75-
config:
76-
hide_groups_header: true
77-
allow:
78-
- admin
79-
- anon
51+
- name: auth-v1
52+
_comment: "GoTrue: /auth/v1/* -> http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999/*"
53+
url: http://{{ include "supabase.auth.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9999
54+
routes:
55+
- name: auth-v1-all
56+
strip_path: true
57+
paths:
58+
- /auth/v1/
59+
plugins:
60+
- name: cors
61+
- name: key-auth
62+
config:
63+
hide_credentials: false
64+
- name: acl
65+
config:
66+
hide_groups_header: true
67+
allow:
68+
- admin
69+
- anon
8070

8171

82-
- name: rest-v1
83-
_comment: "PostgREST: /rest/v1/* -> http://{{ include "supabase.rest.fullname" . }}.{{ .Release.Namespace }}:3000/*"
84-
url: http://{{ include "supabase.rest.fullname" . }}.{{ .Release.Namespace }}:3000/
85-
routes:
86-
- name: rest-v1-all
87-
strip_path: true
88-
paths:
89-
- /rest/v1/
90-
plugins:
91-
- name: cors
92-
- name: key-auth
93-
config:
94-
hide_credentials: true
95-
- name: acl
96-
config:
97-
hide_groups_header: true
98-
allow:
99-
- admin
100-
- anon
72+
- name: rest-v1
73+
_comment: "PostgREST: /rest/v1/* -> http://{{ include "supabase.rest.fullname" . }}.{{ .Release.Namespace }}:3000/*"
74+
url: http://{{ include "supabase.rest.fullname" . }}.{{ .Release.Namespace }}:3000/
75+
routes:
76+
- name: rest-v1-all
77+
strip_path: true
78+
paths:
79+
- /rest/v1/
80+
plugins:
81+
- name: cors
82+
- name: key-auth
83+
config:
84+
hide_credentials: true
85+
- name: acl
86+
config:
87+
hide_groups_header: true
88+
allow:
89+
- admin
90+
- anon
10191

102-
- name: realtime-v1
103-
_comment: "Realtime: /realtime/v1/* -> ws://{{ include "supabase.realtime.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:4000/socket/*"
104-
url: http://{{ include "supabase.realtime.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:4000/socket
105-
routes:
106-
- name: realtime-v1-all
107-
strip_path: true
108-
paths:
109-
- /realtime/v1/
110-
plugins:
111-
- name: cors
112-
- name: key-auth
113-
config:
114-
hide_credentials: false
115-
- name: acl
116-
config:
117-
hide_groups_header: true
118-
allow:
119-
- admin
120-
- anon
92+
- name: realtime-v1
93+
_comment: "Realtime: /realtime/v1/* -> ws://{{ include "supabase.realtime.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:4000/socket/*"
94+
url: http://{{ include "supabase.realtime.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:4000/socket
95+
routes:
96+
- name: realtime-v1-all
97+
strip_path: true
98+
paths:
99+
- /realtime/v1/
100+
plugins:
101+
- name: cors
102+
- name: key-auth
103+
config:
104+
hide_credentials: false
105+
- name: acl
106+
config:
107+
hide_groups_header: true
108+
allow:
109+
- admin
110+
- anon
121111

122-
- name: storage-v1
123-
_comment: "Storage: /storage/v1/* -> http://{{ include "supabase.storage.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000/*"
124-
url: http://{{ include "supabase.storage.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000/
125-
routes:
126-
- name: storage-v1-all
127-
strip_path: true
128-
paths:
129-
- /storage/v1/
130-
plugins:
131-
- name: cors
112+
- name: storage-v1
113+
_comment: "Storage: /storage/v1/* -> http://{{ include "supabase.storage.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000/*"
114+
url: http://{{ include "supabase.storage.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000/
115+
routes:
116+
- name: storage-v1-all
117+
strip_path: true
118+
paths:
119+
- /storage/v1/
120+
plugins:
121+
- name: cors
132122

133-
- name: meta
134-
_comment: "pg-meta: /pg/* -> http://{{ include "supabase.meta.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:8080/*"
135-
url: http://{{ include "supabase.meta.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:8080/
136-
routes:
137-
- name: meta-all
138-
strip_path: true
139-
paths:
140-
- /pg/
141-
plugins:
142-
- name: key-auth
143-
config:
144-
hide_credentials: false
145-
- name: acl
146-
config:
147-
hide_groups_header: true
148-
allow:
149-
- admin
123+
- name: meta
124+
_comment: "pg-meta: /pg/* -> http://{{ include "supabase.meta.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:8080/*"
125+
url: http://{{ include "supabase.meta.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:8080/
126+
routes:
127+
- name: meta-all
128+
strip_path: true
129+
paths:
130+
- /pg/
131+
plugins:
132+
- name: key-auth
133+
config:
134+
hide_credentials: false
135+
- name: acl
136+
config:
137+
hide_groups_header: true
138+
allow:
139+
- admin
150140
{{- end }}
141+
142+
143+
{{- if .Values.kong.enable -}}
144+
145+
146+
apiVersion: v1
147+
kind: ConfigMap
148+
metadata:
149+
name: {{ include "supabase.kong.fullname" . }}
150+
labels:
151+
{{- include "supabase.labels" . | nindent 4 }}
152+
data:
153+
{{- toYaml .Values.kong.environment | nindent 2 }}
154+
kong.yml: {{ include "supabase.kong-config" . | quote }}
155+
151156
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{{- if .Values.kong.enable -}}
2-
{{- if .Values.kong.serviceAccount.create -}}
3-
apiVersion: v1
4-
kind: ServiceAccount
5-
metadata:
6-
name: {{ include "supabase.kong.serviceAccountName" . }}
7-
labels:
8-
{{- include "supabase.labels" . | nindent 4 }}
9-
{{- with .Values.kong.serviceAccount.annotations }}
10-
annotations:
11-
{{- toYaml . | nindent 4 }}
12-
{{- end }}
2+
{{- if .Values.kong.serviceAccount.create -}}
3+
apiVersion: v1
4+
kind: ServiceAccount
5+
metadata:
6+
name: {{ include "supabase.kong.serviceAccountName" . }}
7+
labels:
8+
{{- include "supabase.labels" . | nindent 4 }}
9+
{{- with .Values.kong.serviceAccount.annotations }}
10+
annotations:
11+
{{- toYaml . | nindent 4 }}
1312
{{- end }}
13+
{{- end }}
1414
{{- end }}

charts/supabase/templates/rest/config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ metadata:
55
labels:
66
{{- include "supabase.labels" . | nindent 4 }}
77
data:
8+
PGRST_DB_URI: postgres://postgres:{{ .Values.db_password }}@{{ include 'common.names.fullname' }}.{{ .Release.Namespace }}.svc.cluster.local:5432/postgres
9+
PGRST_JWT_SECRET: {{ .Values.jwt_secret }}
810
{{- toYaml .Values.rest.environment | nindent 2 }}
11+

charts/supabase/templates/studio/config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ metadata:
66
labels:
77
{{- include "supabase.labels" . | nindent 4 }}
88
data:
9+
STUDIO_PG_META_URL: http://{{ include "supabase.kong.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:8000/pg
10+
SUPABASE_ANON_KEY: {{ .Values.anon_key | quote }}
11+
SUPABASE_SERVICE_KEY: {{ .Values.service_key | quote }}
912
{{- toYaml .Values.studio.environment | nindent 2 }}
1013
{{- end }}

0 commit comments

Comments
 (0)