Files
charts/bitnami/supabase/templates/jwt-secret.yaml

27 lines
1.3 KiB
YAML

{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (not .Values.global.jwt.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "supabase.jwt.secretName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: supabase
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
secret: {{ include "common.secrets.passwords.manage" (dict "secret" (include "supabase.jwt.secretName" .) "key" "secret" "providedValues" (list "jwt.secret") "length" 42 "context" $) }}
{{- if or .Values.jwt.anonKey .Release.IsUpgrade }}
anon-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "supabase.jwt.secretName" .) "key" "anon-key" "providedValues" (list "jwt.anonKey") "context" $) }}
{{- end }}
{{- if or .Values.jwt.serviceKey .Release.IsUpgrade }}
service-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "supabase.jwt.secretName" .) "key" "service-key" "providedValues" (list "jwt.serviceKey") "context" $) }}
{{- end }}
{{- end }}