peertube: Update to 5.0.0

This commit is contained in:
Alexander Olofsson 2022-12-13 15:43:07 +01:00
parent 6b2553e72a
commit 5d3e6d6960
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
5 changed files with 42 additions and 2 deletions

View file

@ -5,8 +5,8 @@ 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.1.3
appVersion: 4.3.1
version: 0.2.0
appVersion: 5.0.0
maintainers:
- name: Alexander Olofsson
email: ace@haxalot.com

View file

@ -72,6 +72,22 @@ Create the name of the service account to use
{{- end }}
{{- end }}
{{/*
include "peertube.randHex" 2 > result "4e"
*/}}
{{- define "peertube.randHex" -}}
{{- $result := "" -}}
{{- range $i := until . -}}
{{- $base := shuffle "0123456789abcdef" -}}
{{- $i_curr := (randNumeric 1) | int -}}
{{- $i_next := add $i_curr 1 | int -}}
{{- $rand_hex := substr $i_curr $i_next $base -}}
{{- $result = print $result $rand_hex -}}
{{- end -}}
{{- $result -}}
{{- end -}}
{{/*
Replicate the Postgres fullname
*/}}

View file

@ -60,6 +60,16 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
command:
- bash
- -c
- |
(
echo "Running migrations in background..."
find dist/scripts/migrations/ -iname '*.js' | xargs -rn1 node
echo "Background migrations have finished."
) &
node dist/server
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ include "peertube.imageTag" . }}"

View file

@ -9,6 +9,17 @@ metadata:
labels:
{{- include "peertube.labels" . | nindent 4 }}
data:
{{- if .Values.config.secret }}
PEERTUBE_SECRET: {{ .Values.config.secret | b64enc }}
{{- else }}
{{- $existing := (lookup "v1" "Secret" .Release.Namespace (include "peertube.fullname" .)).data.PEERTUBE_SECRET }}
{{- if $existing }}
PEERTUBE_SECRET: {{ $existing }}
{{- else }}
PEERTUBE_SECRET: {{ (include "peertube.randHex" 32) | b64enc }}
{{- end }}
{{- end }}
{{- if (and .Values.externalPostgresql.password (not .Values.externalPostgresql.existingSecret)) }}
PEERTUBE_DB_PASSWORD: {{ .Values.externalPostgresql.password | b64enc }}
{{- end }}

View file

@ -26,6 +26,9 @@ config:
## use an init-container to create a config folder in your persistent storage.
webadminConfig: true
## Generate with somethingl like `openssl rand -hex 32` - will auto-generate if left blank
#secret:
admin:
email: