From f5b64cb05841bdfd3ab02db2d13987f08e0b22d2 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:17:26 -0400 Subject: [PATCH] fix(kaizoku) fix redis and cnpg (#12046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Possible fix for its redis dependency, removed the secrets and replaced it with the std secret. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/incubator/kaizoku/Chart.yaml | 8 ++++---- charts/incubator/kaizoku/templates/_secrets.tpl | 13 ------------- charts/incubator/kaizoku/templates/common.yaml | 12 +----------- charts/incubator/kaizoku/values.yaml | 6 +++--- 4 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 charts/incubator/kaizoku/templates/_secrets.tpl diff --git a/charts/incubator/kaizoku/Chart.yaml b/charts/incubator/kaizoku/Chart.yaml index d2c3e655aaf..75f486a5152 100644 --- a/charts/incubator/kaizoku/Chart.yaml +++ b/charts/incubator/kaizoku/Chart.yaml @@ -3,13 +3,13 @@ appVersion: "1.6.1" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 14.0.1 + version: 14.0.3 - condition: redis.enabled name: redis repository: https://deps.truecharts.org - version: 6.0.66 + version: 7.0.6 deprecated: false -description: Kaizoku is self-hosted manga downloader. +description: A self-hosted manga downloader. home: https://truecharts.org/charts/incubator/kaizoku icon: https://truecharts.org/img/hotlink-ok/chart-icons/kaizoku.png keywords: @@ -24,7 +24,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/kaizoku - https://github.com/oae/kaizoku type: application -version: 0.0.1 +version: 0.1.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/incubator/kaizoku/templates/_secrets.tpl b/charts/incubator/kaizoku/templates/_secrets.tpl deleted file mode 100644 index 2ab54ac74e4..00000000000 --- a/charts/incubator/kaizoku/templates/_secrets.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Define the secrets */}} -{{- define "kaizoku.secret" -}} - -{{- $user := .Values.cnpg.main.user -}} -{{- $password := .Values.cnpg.main.creds.password | trimAll "\"" -}} -{{- $host := .Values.cnpg.main.creds.host | trimAll "\"" -}} -{{- $database := .Values.cnpg.main.database -}} - -kaizoku-secret: - enabled: true - data: - DATABASE_URL: {{ printf "postgresql://%v:%v@%v:5432/%v" $user $password $host $database }} -{{- end -}} diff --git a/charts/incubator/kaizoku/templates/common.yaml b/charts/incubator/kaizoku/templates/common.yaml index 4e07d957094..b51394e00a4 100644 --- a/charts/incubator/kaizoku/templates/common.yaml +++ b/charts/incubator/kaizoku/templates/common.yaml @@ -1,11 +1 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . }} - -{{- $secret := include "kaizoku.secret" . | fromYaml -}} -{{- if $secret -}} - {{ $secret := (mustMergeOverwrite .Values.secret $secret) }} - {{- $_ := set .Values "secret" $secret -}} -{{- end -}} - -{{/* Render the templates */}} -{{ include "tc.v1.common.loader.apply" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/kaizoku/values.yaml b/charts/incubator/kaizoku/values.yaml index 78e0c81de7c..3d79af581b7 100644 --- a/charts/incubator/kaizoku/values.yaml +++ b/charts/incubator/kaizoku/values.yaml @@ -26,13 +26,13 @@ workload: KAIZOKU_PORT: "{{ .Values.service.main.ports.main.port }}" DATABASE_URL: secretKeyRef: - name: kaizoku-secret - key: DATABASE_URL + name: cnpg-main-urls + key: std REDIS_HOST: secretKeyRef: expandObjectName: false name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}' - key: url + key: plainhost REDIS_PORT: 6379 persistence: