mirror of
https://github.com/rtomik/helm-charts.git
synced 2026-07-16 16:25:16 +00:00
release paperless ngx 0.0.2 fixed bug with redis configuration
This commit is contained in:
@ -90,10 +90,20 @@ Redis port
|
||||
|
||||
{{/*
|
||||
Redis URL
|
||||
Constructs the Redis URL with optional authentication.
|
||||
Format: redis://[username]:[password]@host:port/database
|
||||
*/}}
|
||||
{{- define "paperless-ngx.redis.url" -}}
|
||||
{{- $host := include "paperless-ngx.redis.host" . }}
|
||||
{{- $port := include "paperless-ngx.redis.port" . }}
|
||||
{{- $database := .Values.redis.external.database | toString }}
|
||||
{{- $username := .Values.redis.external.username | default "" }}
|
||||
{{- $password := .Values.redis.external.password | default "" }}
|
||||
{{- if and $username $password }}
|
||||
{{- printf "redis://%s:%s@%s:%s/%s" $username $password $host $port $database }}
|
||||
{{- else if $password }}
|
||||
{{- printf "redis://:%s@%s:%s/%s" $password $host $port $database }}
|
||||
{{- else }}
|
||||
{{- printf "redis://%s:%s/%s" $host $port $database }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@ -69,6 +69,10 @@ spec:
|
||||
# Required services
|
||||
- name: PAPERLESS_REDIS
|
||||
value: {{ include "paperless-ngx.redis.url" . | quote }}
|
||||
{{- if .Values.redis.external.prefix }}
|
||||
- name: PAPERLESS_REDIS_PREFIX
|
||||
value: {{ .Values.redis.external.prefix | quote }}
|
||||
{{- end }}
|
||||
- name: PAPERLESS_DBHOST
|
||||
value: {{ include "paperless-ngx.postgresql.host" . | quote }}
|
||||
- name: PAPERLESS_DBPORT
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
{{- if not .Values.postgresql.external.existingSecret -}}
|
||||
{{- $needsSecret = true -}}
|
||||
{{- end -}}
|
||||
{{- if and .Values.redis.external.password (not .Values.redis.external.existingSecret) -}}
|
||||
{{- $needsSecret = true -}}
|
||||
{{- end -}}
|
||||
{{- if and .Values.config.admin.user (not .Values.config.admin.existingSecret) -}}
|
||||
{{- $needsSecret = true -}}
|
||||
{{- end -}}
|
||||
@ -27,6 +30,9 @@ data:
|
||||
{{- if not .Values.postgresql.external.existingSecret }}
|
||||
{{ .Values.postgresql.external.passwordKey | default "postgresql-password" }}: {{ .Values.postgresql.external.password | default "paperless" | b64enc }}
|
||||
{{- end }}
|
||||
{{- if and .Values.redis.external.password (not .Values.redis.external.existingSecret) }}
|
||||
{{ .Values.redis.external.passwordKey | default "redis-password" }}: {{ .Values.redis.external.password | b64enc }}
|
||||
{{- end }}
|
||||
{{- if and .Values.config.admin.user (not .Values.config.admin.existingSecret) }}
|
||||
{{ .Values.config.admin.userKey | default "admin-user" }}: {{ .Values.config.admin.user | b64enc }}
|
||||
{{ .Values.config.admin.passwordKey | default "admin-password" }}: {{ .Values.config.admin.password | default "changeme" | b64enc }}
|
||||
|
||||
Reference in New Issue
Block a user