peertube: Improve secret generation

This commit is contained in:
Alexander "Ace" Olofsson 2022-12-20 20:05:30 +01:00
parent b28c87c26e
commit 131a099c87
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
2 changed files with 2 additions and 2 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 icon: https://upload.wikimedia.org/wikipedia/commons/2/2b/Logo_de_PeerTube.svg
type: application type: application
version: 0.3.0 version: 0.3.1
appVersion: 5.0.0 appVersion: 5.0.0
maintainers: maintainers:
- name: Alexander Olofsson - name: Alexander Olofsson

View file

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