37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
{{- if not .Values.existingSecret }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "n8n.fullname" . }}
|
|
labels:
|
|
{{- include "n8n.labels" . | nindent 4 }}
|
|
type: Opaque
|
|
data:
|
|
{{- if .Values.config.encryption_key }}
|
|
N8N_ENCRYPTION_KEY: {{ default "" .Values.config.encryption_key | b64enc | quote }}
|
|
{{- else }}
|
|
N8N_ENCRYPTION_KEY: {{ randAlphaNum 10 | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.db_type }}
|
|
DB_TYPE: {{ .Values.config.db_type | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.database }}
|
|
DB_POSTGRESDB_DATABASE: {{ .Values.config.postgres.database | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.host }}
|
|
DB_POSTGRESDB_HOST: {{ .Values.config.postgres.host | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.port }}
|
|
DB_POSTGRESDB_PORT: {{ .Values.config.postgres.port | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.user }}
|
|
DB_POSTGRESDB_USER: {{ .Values.config.postgres.user | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.schema }}
|
|
DB_POSTGRESDB_SCHEMA: {{ .Values.config.postgres.schema | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.postgres.password }}
|
|
DB_POSTGRESDB_PASSWORD: {{ .Values.config.postgres.password | b64enc | quote }}
|
|
{{- end }}
|
|
{{- end }}
|