61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: {{ include "paperless-ngx.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "paperless-ngx.labels" . | nindent 4 }}
|
||
|
annotations:
|
||
|
"checksum/config": {{ toYaml .Values.config | sha256sum }}
|
||
|
"checksum/env": {{ toYaml .Values.env | sha256sum }}
|
||
|
|
||
|
data:
|
||
|
PAPERLESS_URL: {{ toYaml .Values.config.url | b64enc }}
|
||
|
{{- with .Values.config.redis }}
|
||
|
{{- with .url }}
|
||
|
PAPERLESS_REDIS: {{ toYaml . | b64enc }}
|
||
|
{{- else }}
|
||
|
{{- if $.Values.redis.auth.enabled }}
|
||
|
{{- if $.Values.redis.auth.existingSecret }}
|
||
|
PAPERLESS_REDIS: {{ printf "redis://:$(REDIS_PASSWORD)@%s-redis-master" (include "paperless-ngx.fullname" $)| b64enc }}
|
||
|
{{- else }}
|
||
|
PAPERLESS_REDIS: {{ printf "redis://:%s@%s-redis-master" $.Values.redis.auth.password (include "paperless-ngx.fullname" $)| b64enc }}
|
||
|
{{- end }}
|
||
|
{{- else }}
|
||
|
PAPERLESS_REDIS: {{ printf "redis://%s-redis-master" (include "paperless-ngx.fullname" $)| b64enc }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- with .prefix }}
|
||
|
PAPERLESS_REDIS_PREFIX: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{- with .Values.config.database }}
|
||
|
{{- with .engine }}
|
||
|
PAPERLESS_DBENGINE: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .host }}
|
||
|
PAPERLESS_DBHOST: {{ toYaml . | b64enc }}
|
||
|
{{- else }}
|
||
|
PAPERLESS_DBHOST: {{ printf "%s-postgresql" (include "paperless-ngx.fullname" $) | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .port }}
|
||
|
PAPERLESS_DBPORT: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .name }}
|
||
|
PAPERLESS_DBNAME: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .user }}
|
||
|
PAPERLESS_DBUSER: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .pass }}
|
||
|
PAPERLESS_DBPASS: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- with .sslmode }}
|
||
|
PAPERLESS_DBSSLMODE: {{ toYaml . | b64enc }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- range $name, $value := .Values.env }}
|
||
|
{{ $name }}: {{ toYaml $value | b64enc }}
|
||
|
{{- end }}
|