dockers/examples/helm/templates/secret.yaml
{{- $postgres:= include "common.nameBuilder" (list $ "postgresql") }}
{{- $redis:= include "common.nameBuilder" (list $ "redis-master") }}
{{- $defaultAdminDbPassword := .Values.postgresql.auth.password | default (randAlphaNum 32) }}
{{- $defaultRedisPassword := .Values.redis.auth.password | default (randAlphaNum 32) }}
{{- $defaultMinioPassword := .Values.minio.auth.password | default (randAlphaNum 32) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "teable.secretName" . }}
namespace: {{ include "common.namespace" . }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": before-hook-creation
labels:
{{- include "common.labels" . | nindent 4 }}
type: Opaque
stringData:
jwt-secret: {{ .Values.config.jwtSecret | default (randAlphaNum 64) | quote }}
session-secret: {{ .Values.config.sessionSecret | default (randAlphaNum 64) | quote }}
accessToken-encryption-key: {{ .Values.config.accessToken.key | default (randAlphaNum 16) | quote }}
accessToken-encryption-iv: {{ .Values.config.accessToken.iv | default (randAlphaNum 16) | quote }}
database-admin-password: {{ $defaultAdminDbPassword | quote }}
database-user-password: {{ .Values.postgresql.auth.password | default (randAlphaNum 32) | quote }}
database-replication-password: {{ .Values.postgresql.auth.password | default (randAlphaNum 32) | quote }}
redis-password: {{ $defaultRedisPassword | quote }}
minio-user: admin
minio-password: {{ $defaultMinioPassword | quote }}
{{- if .Values.minio.apiIngress }}
minio-url: "{{- if .Values.ingress.tls -}}https{{- else -}}http{{- end }}://{{ .Values.minio.apiIngress.hostname }}{{- if .Values.minio.apiIngress.path -}}{{ .Values.minio.apiIngress.path }}{{- end }}"
{{- end }}
# app need the admin db permission
database-url: {{ printf "postgresql://%s:%s@%s:%s/%s" "postgres" $defaultAdminDbPassword $postgres (toString .Values.postgresql.primary.service.ports.postgresql) .Values.postgresql.auth.database | quote }}
redis-url: {{ printf "redis://default:%s@%s:%s/%s" $defaultRedisPassword $redis (toString .Values.redis.master.service.ports.redis) (toString .Values.config.redisDb) | quote }}
{{- if .Values.config.mail.host }}
mail-auth-password: {{ .Values.config.mail.auth.password | quote }}
{{- end }}