peertube: Fix loading of existing secret data

This commit is contained in:
Alexander "Ace" Olofsson 2022-12-18 07:25:48 +01:00
parent c1b0d8469a
commit c39a4f7ab2
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ description: Free software to take back control of your videos
icon: https://upload.wikimedia.org/wikipedia/commons/2/2b/Logo_de_PeerTube.svg
type: application
version: 0.2.0
version: 0.2.1
appVersion: 5.0.0
maintainers:
- name: Alexander Olofsson

View file

@ -12,9 +12,9 @@ data:
{{- if .Values.config.secret }}
PEERTUBE_SECRET: {{ .Values.config.secret | b64enc }}
{{- else }}
{{- $existing := (lookup "v1" "Secret" .Release.Namespace (include "peertube.fullname" .)).data.PEERTUBE_SECRET }}
{{- $existing := (lookup "v1" "Secret" .Release.Namespace (include "peertube.fullname" .)) }}
{{- if $existing }}
PEERTUBE_SECRET: {{ $existing }}
PEERTUBE_SECRET: {{ $existing.data.PEERTUBE_SECRET }}
{{- else }}
PEERTUBE_SECRET: {{ (include "peertube.randHex" 32) | b64enc }}
{{- end }}