mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 17:52:13 +08:00
invidious - fix db name and cleanup init logs (#2131)
* invidious - fix db name and cleanup init logs * bump major to skip running upgrade task
This commit is contained in:
@@ -3,7 +3,7 @@ description: Invidious is an alternative front-end to YouTube
|
||||
annotations:
|
||||
title: Invidious
|
||||
type: application
|
||||
version: 1.0.3
|
||||
version: 2.0.0
|
||||
apiVersion: v2
|
||||
appVersion: latest
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{{- $dbHost := (printf "%s-postgres" $fullname) -}}
|
||||
{{- $dbUser := "kemal" -}} {{/* User is hardcoded */}}
|
||||
{{- $dbName := "invidious" -}}
|
||||
{{- $dbName := "kemal" -}} {{/* Database is hardcoded */}}
|
||||
|
||||
{{- $dbPass := (randAlphaNum 32) -}}
|
||||
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-postgres-creds" $fullname)) -}}
|
||||
@@ -40,11 +40,11 @@ secret:
|
||||
{{- $configOpts := list
|
||||
(dict "path" "check_tables" "value" "true")
|
||||
(dict "path" "database_url" "value" ($dbURL | quote))
|
||||
(dict "path" "database.user" "value" ($dbUser | quote))
|
||||
(dict "path" "database.password" "value" ($dbPass | quote))
|
||||
(dict "path" "database.dbname" "value" ($dbName | quote))
|
||||
(dict "path" "database.host" "value" ($dbHost | quote))
|
||||
(dict "path" "database.port" "value" "5432")
|
||||
(dict "path" "db.user" "value" ($dbUser | quote))
|
||||
(dict "path" "db.password" "value" ($dbPass | quote))
|
||||
(dict "path" "db.dbname" "value" ($dbName | quote))
|
||||
(dict "path" "db.host" "value" ($dbHost | quote))
|
||||
(dict "path" "db.port" "value" "5432")
|
||||
(dict "path" "hmac_key" "value" ($hmacKey | quote))
|
||||
(dict "path" "host_binding" "value" ("0.0.0.0" | quote))
|
||||
(dict "path" "port" "value" .Values.invidiousNetwork.webPort)
|
||||
@@ -63,9 +63,9 @@ secret:
|
||||
config="/config/config.yaml"
|
||||
echo "Updating Invidious Config..."
|
||||
{{- range $item := $configOpts }}
|
||||
echo "Updating {{ $item.path }} to {{ $item.value }}"
|
||||
echo "Updating [{{ $item.path }}]"
|
||||
yq -i '.{{ $item.path }} = {{ $item.value }}' "$config"
|
||||
echo "Updated [{{ $item.path }}] to $(yq '.{{ $item.path }}' "$config")"
|
||||
{{- end }}
|
||||
cat "$config"
|
||||
echo "Config already exists, skipping."
|
||||
echo "Config updated!"
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
{{- include "ix.v1.common.loader.init" . -}}
|
||||
|
||||
{{- if not .Values.yqImage -}}
|
||||
{{- $_ := set .Values "yqImage" (dict
|
||||
"repository" "mikefarah/yq"
|
||||
"tag" "4.40.5"
|
||||
"pullPolicy" "IfNotPresent"
|
||||
) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Merge the templates with Values */}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "invidious.configuration" $ | fromYaml) -}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "invidious.service" $ | fromYaml) -}}
|
||||
|
||||
@@ -49,7 +49,7 @@ notes:
|
||||
<details>
|
||||
<summary>Database Details</summary>
|
||||
|
||||
- Database: `invidious`
|
||||
- Database: `kemal`
|
||||
- Username: `kemal`
|
||||
- Password: `{{ .Values.invidiousDbPass }}`
|
||||
- Host: `{{ .Values.invidiousDbHost }}.{{ .Release.Namespace }}.svc.cluster.local`
|
||||
|
||||
Reference in New Issue
Block a user