{{- if .Values.globals.createSecrets -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "budibase.fullname" . }}
  labels:
    app: {{ template "budibase.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  internalApiKey: {{ template "budibase.defaultsecret" .Values.globals.internalApiKey }}
  jwtSecret: {{ template "budibase.defaultsecret" .Values.globals.jwtSecret }}
  objectStoreAccess: {{ template "budibase.defaultsecret" .Values.services.objectStore.accessKey }}
  objectStoreSecret: {{ template "budibase.defaultsecret" .Values.services.objectStore.secretKey }}
{{- end -}}
