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