Skip to content

Commit

Permalink
Fix secretRefKey included in secret
Browse files Browse the repository at this point in the history
* exclude empty secret from being encoded
  • Loading branch information
drpsyko101 committed Apr 13, 2024
1 parent f6cbcdb commit ff3a024
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.analytics }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.dashboard }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.db }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
{{- end }}
password_encoded: {{ .Values.secret.db.password | urlquery | b64enc }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/jwt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.jwt }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | toString | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.s3 }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | toString | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/supabase/templates/secrets/smtp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
type: Opaque
data:
{{- range $key, $value := .Values.secret.smtp }}
{{- if $value }}
{{- if eq (typeOf $value) "string" }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit ff3a024

Please sign in to comment.