Ver Fonte

invidious - fix db name and cleanup init logs (#2131)

* invidious - fix db name and cleanup init logs

* bump major to skip running upgrade task
Stavros Kois há 1 ano atrás
pai
commit
a1c210bb8b

+ 1 - 1
library/ix-dev/community/invidious/Chart.yaml

@@ -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'

+ 9 - 9
library/ix-dev/community/invidious/templates/_configuration.tpl

@@ -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 -}}

+ 0 - 8
library/ix-dev/community/invidious/templates/common.yaml

@@ -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) -}}

+ 1 - 1
library/ix-dev/community/invidious/values.yaml

@@ -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`