patch-paperless #40

Merged
marko merged 4 commits from patch-paperless into main 2025-11-23 13:06:37 +00:00
Showing only changes of commit 5f201ba918 - Show all commits

View File

@@ -1,55 +1,50 @@
{{/* Append the hardcoded settings */}} {{/* Append the hardcoded settings */}}
{{- define "healthchecks.harcodedValues" -}} {{- define "healthchecks.harcodedValues" -}}
controllers: env:
main: PAPERLESS_TIME_ZONE: {{ .Values.env.TZ }}
type: deployment PAPERLESS_PORT: {{ quote .Values.service.main.ports.http.port }}
containers:
main: {{- with .Values.ingress.main }}
env: {{- if and .enabled .hosts }}
PAPERLESS_TIME_ZONE: {{ .Values.env.TZ }} PAPERLESS_URL: http{{ if .tls }}s{{ end }}://{{ (first .hosts).host }}
PAPERLESS_PORT: {{ quote .Values.service.main.ports.http.port }} {{- end }}
{{- end }}
{{- with .Values.ingress.main }}
{{- if and .enabled .hosts }} {{- if .Values.postgresql.enabled }}
PAPERLESS_URL: http{{ if .tls }}s{{ end }}://{{ (first .hosts).host }} {{- with .Values.postgresql }}
{{- end }} PAPERLESS_DBENGINE: postgresql
{{- end }} PAPERLESS_DBHOST: {{ $.Release.Name }}-postgresql
PAPERLESS_DBNAME: {{ .auth.database }}
{{- if .Values.postgresql.enabled }} PAPERLESS_DBUSER: {{ default "postgres" .auth.username }}
{{- with .Values.postgresql }} PAPERLESS_DBPASS:
PAPERLESS_DBENGINE: postgresql secretKeyRef:
PAPERLESS_DBHOST: {{ $.Release.Name }}-postgresql name: {{ .auth.existingSecret | default (printf "%s-postgresql" $.Release.Name) }}
PAPERLESS_DBNAME: {{ .auth.database }} key: {{ if not .auth.password }}postgres-{{ end }}password
PAPERLESS_DBUSER: {{ default "postgres" .auth.username }} {{- end }}
PAPERLESS_DBPASS: {{- else if .Values.mariadb.enabled }}
secretKeyRef: {{- with .Values.mariadb}}
name: {{ .auth.existingSecret | default (printf "%s-postgresql" $.Release.Name) }} PAPERLESS_DBENGINE: mariadb
key: {{ if not .auth.password }}postgres-{{ end }}password PAPERLESS_DBHOST: {{ $.Release.Name }}-mariadb
{{- end }} PAPERLESS_DBNAME: {{ .auth.database }}
{{- else if .Values.mariadb.enabled }} PAPERLESS_DBUSER: {{ .auth.username }}
{{- with .Values.mariadb}} PAPERLESS_DBPASS:
PAPERLESS_DBENGINE: mariadb secretKeyRef:
PAPERLESS_DBHOST: {{ $.Release.Name }}-mariadb name: {{ .auth.existingSecret | default (printf "%s-mariadb" $.Release.Name) }}
PAPERLESS_DBNAME: {{ .auth.database }} key: mariadb-password
PAPERLESS_DBUSER: {{ .auth.username }} {{- end }}
PAPERLESS_DBPASS: {{- end }}
secretKeyRef:
name: {{ .auth.existingSecret | default (printf "%s-mariadb" $.Release.Name) }} {{- if .Values.redis.enabled }}
key: mariadb-password {{- with .Values.redis }}
{{- end }} A_REDIS_PASSWORD:
{{- end }} secretKeyRef:
name: {{ .auth.existingSecret | default (printf "%s-redis" $.Release.Name) }}
{{- if .Values.redis.enabled }} key: {{ .auth.existingSecretPasswordKey | default "redis-password" }}
{{- with .Values.redis }} PAPERLESS_REDIS: redis://{{ .auth.username }}:$(A_REDIS_PASSWORD)@{{ $.Release.Name }}-redis-master
A_REDIS_PASSWORD: {{- end }}
secretKeyRef: {{- end }}
name: {{ .auth.existingSecret | default (printf "%s-redis" $.Release.Name) }}
key: {{ .auth.existingSecretPasswordKey | default "redis-password" }}
PAPERLESS_REDIS: redis://{{ .auth.username }}:$(A_REDIS_PASSWORD)@{{ $.Release.Name }}-redis-master
{{- end }}
{{- end }}
{{- end -}} {{- end -}}
{{- $_ := merge .Values (include "healthchecks.harcodedValues" . | fromYaml) -}} {{- $_ := merge .Values (include "healthchecks.harcodedValues" . | fromYaml) -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "bjw-s.common.loader.all" . }} {{ include "bjw-s.common.loader.all" . }}