From 258752ff601634db92156416e31f8464abcc2b55 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Wed, 16 Aug 2023 05:39:23 -0400 Subject: [PATCH] fix(gamevault-backend) prep gamevault-backend for v3 (#11164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Prepping gamevault-backend for v3 remove the server Port variable and manually set the target port. (this variable was removed by upstream) add Games Search Recursive gui option add Games Supported File Formats gui option. ⚒️ 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/stable/gamevault-backend/Chart.yaml | 2 +- .../stable/gamevault-backend/questions.yaml | 76 ++++++++++++++++++- charts/stable/gamevault-backend/values.yaml | 12 +-- 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/charts/stable/gamevault-backend/Chart.yaml b/charts/stable/gamevault-backend/Chart.yaml index f76bc3b9d72..af30544fd74 100644 --- a/charts/stable/gamevault-backend/Chart.yaml +++ b/charts/stable/gamevault-backend/Chart.yaml @@ -21,7 +21,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/gamevault-backend - https://github.com/Phalcode/gamevault-backend type: application -version: 1.0.1 +version: 1.0.2 annotations: truecharts.org/catagories: | - games diff --git a/charts/stable/gamevault-backend/questions.yaml b/charts/stable/gamevault-backend/questions.yaml index 11b12541d1b..d2b8ae8e5d3 100644 --- a/charts/stable/gamevault-backend/questions.yaml +++ b/charts/stable/gamevault-backend/questions.yaml @@ -49,11 +49,20 @@ questions: default: false - variable: SERVER_CORS_ALLOWED_ORIGINS label: "Server Cors Allowed Origin" - description: "A comma-separated list of Allowed CORS origins for the server." + description: "List of Allowed CORS origins for the server." schema: - type: string + type: list + empty: false required: true - default: "*" + default: + - "*" + items: + - variable: cors + label: Cors + schema: + type: string + required: true + default: "" - variable: SERVER_LOG_LEVEL label: "Server Log Level" description: "The log level of the server." @@ -85,7 +94,65 @@ questions: schema: type: int default: 5 - min: 1 + - variable: GAMES_SEARCH_RECURSIVE + label: "Games Search Recursive" + description: "Toggling the Indexer's search for games in sub folders." + schema: + type: boolean + default: true + - variable: GAMES_SUPPORTED_FILE_FORMATS + label: "Games Supported File Formats" + description: "Custom list of file formats." + schema: + type: list + empty: false + default: + - ".7z" + - ".xz" + - ".bz2" + - ".gz" + - ".tar" + - ".zip" + - ".wim" + - ".ar" + - ".arj" + - ".cab" + - ".chm" + - ".cpio" + - ".cramfs" + - ".dmg" + - ".ext" + - ".fat" + - ".gpt" + - ".hfs" + - ".ihex" + - ".iso" + - ".lzh" + - ".lzma" + - ".mbr" + - ".msi" + - ".nsis" + - ".ntfs" + - ".qcow2" + - ".rar" + - ".rpm" + - ".squashfs" + - ".udf" + - ".uefi" + - ".vdi" + - ".vhd" + - ".vmdk" + - ".wim" + - ".xar" + - ".z" + required: true + items: + - variable: format + label: Format + schema: + type: string + required: true + default: "" - variable: IMAGE_GC_KEEP_DAYS label: "Image GC Keep Days" description: "The number of days to keep unused images. After this period, images that have not been accessed are deleted." @@ -125,6 +192,7 @@ questions: type: string default: "" + # Include{containerBasic} # Include{containerAdvanced} diff --git a/charts/stable/gamevault-backend/values.yaml b/charts/stable/gamevault-backend/values.yaml index ac59bf2a081..a30fd9ebe8a 100644 --- a/charts/stable/gamevault-backend/values.yaml +++ b/charts/stable/gamevault-backend/values.yaml @@ -16,6 +16,7 @@ service: main: protocol: http port: 8080 + targetPort: 8080 workload: main: @@ -33,11 +34,10 @@ workload: path: /api/v1/health type: http env: - SERVER_PORT: "{{ .Values.service.main.ports.main.port }}" # manually set and change to /games so its easy for users to know where to place their game files. - VOLUMES_FILES: /games - VOLUMES_IMAGES: /images - VOLUMES_LOG: /logs + VOLUMES_FILES: "{{.Values.persistence.games.mountPath }}" + VOLUMES_IMAGES: "{{.Values.persistence.images.mountPath }}" + VOLUMES_LOG: "{{.Values.persistence.logs.mountPath }}" # DB DB_SYSTEM: POSTGRESQL DB_PORT: 5432 @@ -58,9 +58,11 @@ workload: SERVER_ACCOUNT_ACTIVATION_DISABLED: false # SERVER SERVER_LOG_LEVEL: info - SERVER_CORS_ALLOWED_ORIGINS: "*" + SERVER_CORS_ALLOWED_ORIGINS: '{{ join "," .Values.workload.main.podSpec.containers.main.env.SERVER_CORS_ALLOWED_ORIGINS }}' # GAMES GAMES_INDEX_INTERVAL_IN_MINUTES: 5 + GAMES_SEARCH_RECURSIVE: true + GAMES_SUPPORTED_FILE_FORMATS: '{{ join "," .Values.workload.main.podSpec.containers.main.env.GAMES_SUPPORTED_FILE_FORMATS }}' # IMAGES IMAGE_GC_KEEP_DAYS: 30 IMAGE_GC_INTERVAL_MINUTES: 60