patch-paperless #40

Merged
marko merged 4 commits from patch-paperless into main 2025-11-23 13:06:37 +00:00
2 changed files with 52 additions and 48 deletions
Showing only changes of commit d3a54f13b0 - Show all commits

View File

@@ -1,48 +1,53 @@
{{/* Append the hardcoded settings */}} {{/* Append the hardcoded settings */}}
{{- define "healthchecks.harcodedValues" -}} {{- define "healthchecks.harcodedValues" -}}
env: controllers:
PAPERLESS_TIME_ZONE: {{ .Values.env.TZ }} main:
PAPERLESS_PORT: {{ quote .Values.service.main.ports.http.port }} type: deployment
containers:
{{- with .Values.ingress.main }} main:
{{- if and .enabled .hosts }} env:
PAPERLESS_URL: http{{ if .tls }}s{{ end }}://{{ (first .hosts).host }} PAPERLESS_TIME_ZONE: {{ .Values.env.TZ }}
{{- end }} PAPERLESS_PORT: {{ quote .Values.service.main.ports.http.port }}
{{- end }}
{{- with .Values.ingress.main }}
{{- if .Values.postgresql.enabled }} {{- if and .enabled .hosts }}
{{- with .Values.postgresql }} PAPERLESS_URL: http{{ if .tls }}s{{ end }}://{{ (first .hosts).host }}
PAPERLESS_DBENGINE: postgresql {{- end }}
PAPERLESS_DBHOST: {{ $.Release.Name }}-postgresql {{- end }}
PAPERLESS_DBNAME: {{ .auth.database }}
PAPERLESS_DBUSER: {{ default "postgres" .auth.username }} {{- if .Values.postgresql.enabled }}
PAPERLESS_DBPASS: {{- with .Values.postgresql }}
secretKeyRef: PAPERLESS_DBENGINE: postgresql
name: {{ .auth.existingSecret | default (printf "%s-postgresql" $.Release.Name) }} PAPERLESS_DBHOST: {{ $.Release.Name }}-postgresql
key: {{ if not .auth.password }}postgres-{{ end }}password PAPERLESS_DBNAME: {{ .auth.database }}
{{- end }} PAPERLESS_DBUSER: {{ default "postgres" .auth.username }}
{{- else if .Values.mariadb.enabled }} PAPERLESS_DBPASS:
{{- with .Values.mariadb}} secretKeyRef:
PAPERLESS_DBENGINE: mariadb name: {{ .auth.existingSecret | default (printf "%s-postgresql" $.Release.Name) }}
PAPERLESS_DBHOST: {{ $.Release.Name }}-mariadb key: {{ if not .auth.password }}postgres-{{ end }}password
PAPERLESS_DBNAME: {{ .auth.database }} {{- end }}
PAPERLESS_DBUSER: {{ .auth.username }} {{- else if .Values.mariadb.enabled }}
PAPERLESS_DBPASS: {{- with .Values.mariadb}}
secretKeyRef: PAPERLESS_DBENGINE: mariadb
name: {{ .auth.existingSecret | default (printf "%s-mariadb" $.Release.Name) }} PAPERLESS_DBHOST: {{ $.Release.Name }}-mariadb
key: mariadb-password PAPERLESS_DBNAME: {{ .auth.database }}
{{- end }} PAPERLESS_DBUSER: {{ .auth.username }}
{{- end }} PAPERLESS_DBPASS:
secretKeyRef:
{{- if .Values.redis.enabled }} name: {{ .auth.existingSecret | default (printf "%s-mariadb" $.Release.Name) }}
{{- with .Values.redis }} key: mariadb-password
A_REDIS_PASSWORD: {{- end }}
secretKeyRef: {{- end }}
name: {{ .auth.existingSecret | default (printf "%s-redis" $.Release.Name) }}
key: {{ .auth.existingSecretPasswordKey | default "redis-password" }} {{- if .Values.redis.enabled }}
PAPERLESS_REDIS: redis://{{ .auth.username }}:$(A_REDIS_PASSWORD)@{{ $.Release.Name }}-redis-master {{- with .Values.redis }}
{{- end }} A_REDIS_PASSWORD:
{{- end }} secretKeyRef:
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) -}}

View File

@@ -20,11 +20,10 @@ controllers:
# @default -- See [values.yaml](./values.yaml) # @default -- See [values.yaml](./values.yaml)
# -- Set the resource requests / limits for the container. # -- Set the resource requests / limits for the container.
resources: {} resources: {}
env:
env: # -- Set the container timezone
# -- Set the container timezone TZ: UTC
TZ: UTC # PAPERLESS_SECRET_KEY: ""
# PAPERLESS_SECRET_KEY: ""
service: service:
# -- Configures service settings for the chart. # -- Configures service settings for the chart.