Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/paperlessngx-ftp-bridge/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sources:
- https://github.com/taskmedia/helm
icon: https://media.task.media/images/logo.png
type: application
version: 2.0.2
version: 2.0.3
# app image tag (v<appVersion>); bumped manually when the bridge repo releases
appVersion: "2.1.1"

Expand All @@ -30,5 +30,5 @@ annotations:
- name: paperlessngx-ftp-bridge
image: ghcr.io/taskmedia/paperlessngx-ftp-bridge-image:v2.1.1
artifacthub.io/changes: |
- kind: changed
description: Add Artifact Hub metadata (category, links, images)
- kind: fixed
description: Only create the Secret when an inline password is configured
21 changes: 14 additions & 7 deletions charts/paperlessngx-ftp-bridge/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{{- $data := dict }}
{{- range $i, $account := .Values.ftp.accounts }}
{{- $existingSecret := $account.passwordExistingSecret | default dict }}
{{- if and $account.password (not $existingSecret.name) }}
{{- $_ := set $data (printf "ftp-account-%d-password" $i) $account.password }}
{{- end }}
{{- end }}
{{- if and .Values.paperless.password (not .Values.paperless.passwordExistingSecret.name) }}
{{- $_ := set $data "paperless-password" .Values.paperless.password }}
{{- end }}
{{- if $data }}
apiVersion: v1
kind: Secret
metadata:
name: "{{ include "plngxftpbridge.fullname" . }}"
type: Opaque
stringData:
{{- range $i, $account := .Values.ftp.accounts }}
{{- if $account.password }}
ftp-account-{{ $i }}-password: {{ $account.password | quote }}
{{- end }}
{{- end }}
{{- if .Values.paperless.password }}
paperless-password: {{ .Values.paperless.password | quote }}
{{- range $key, $value := $data }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
Loading