mirror of
https://github.com/rtomik/helm-charts.git
synced 2026-04-05 17:50:38 +00:00
fixed [Bug][Paperless] Redis password from secret isn't working #5
This commit is contained in:
@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: donetick
|
||||
description: Donetick helm chart for Kubernetes
|
||||
type: application
|
||||
version: 1.0.4
|
||||
version: 1.0.5
|
||||
appVersion: "v0.1.60"
|
||||
maintainers:
|
||||
- name: Richard Tomik
|
||||
|
||||
@ -37,11 +37,9 @@ data:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
jwt:
|
||||
{{- if .Values.config.jwt.existingSecret }}
|
||||
# Secret will be injected from Secret
|
||||
{{- else }}
|
||||
secret: {{ .Values.config.jwt.secret | quote }}
|
||||
{{- end }}
|
||||
# Placeholder value - actual secret injected via DT_JWT_SECRET env var
|
||||
# This placeholder is required for environment variable overrides to work
|
||||
secret: "placeholder"
|
||||
session_time: {{ .Values.config.jwt.session_time | quote }}
|
||||
max_refresh: {{ .Values.config.jwt.max_refresh | quote }}
|
||||
server:
|
||||
|
||||
@ -2,8 +2,8 @@ apiVersion: v2
|
||||
name: paperless-ngx
|
||||
description: Paperless-ngx helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.0.3
|
||||
appVersion: "latest"
|
||||
version: 0.0.4
|
||||
appVersion: "2.20.3"
|
||||
maintainers:
|
||||
- name: Richard Tomik
|
||||
email: richard.tomik@proton.me
|
||||
|
||||
@ -92,17 +92,26 @@ Redis port
|
||||
Redis URL
|
||||
Constructs the Redis URL with optional authentication.
|
||||
Format: redis://[username]:[password]@host:port/database
|
||||
When existingSecret is configured, uses environment variable placeholder for password.
|
||||
*/}}
|
||||
{{- 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 }}
|
||||
{{- if .Values.redis.external.existingSecret }}
|
||||
{{- if $username }}
|
||||
{{- printf "redis://%s:$REDIS_PASSWORD@%s:%s/%s" $username $host $port $database }}
|
||||
{{- else }}
|
||||
{{- printf "redis://:$REDIS_PASSWORD@%s:%s/%s" $host $port $database }}
|
||||
{{- end }}
|
||||
{{- else if .Values.redis.external.password }}
|
||||
{{- $password := .Values.redis.external.password }}
|
||||
{{- if $username }}
|
||||
{{- printf "redis://%s:%s@%s:%s/%s" $username $password $host $port $database }}
|
||||
{{- else if $password }}
|
||||
{{- else }}
|
||||
{{- printf "redis://:%s@%s:%s/%s" $password $host $port $database }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- printf "redis://%s:%s/%s" $host $port $database }}
|
||||
{{- end }}
|
||||
|
||||
@ -73,6 +73,16 @@ spec:
|
||||
- name: PAPERLESS_REDIS_PREFIX
|
||||
value: {{ .Values.redis.external.prefix | quote }}
|
||||
{{- end }}
|
||||
|
||||
# Redis password from secret (if configured)
|
||||
{{- if or .Values.redis.external.existingSecret .Values.redis.external.password }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.redis.external.existingSecret | default (printf "%s-secrets" (include "paperless-ngx.fullname" .)) }}
|
||||
key: {{ .Values.redis.external.passwordKey | default "redis-password" }}
|
||||
{{- end }}
|
||||
|
||||
- name: PAPERLESS_DBHOST
|
||||
value: {{ include "paperless-ngx.postgresql.host" . | quote }}
|
||||
- name: PAPERLESS_DBPORT
|
||||
|
||||
@ -5,7 +5,7 @@ fullnameOverride: ""
|
||||
## Image settings
|
||||
image:
|
||||
repository: ghcr.io/paperless-ngx/paperless-ngx
|
||||
tag: "2.18.4"
|
||||
tag: "2.20.3"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
## Deployment settings
|
||||
|
||||
Reference in New Issue
Block a user