fix(gamevault-backend) fix the gui options. (#11662)

**Description**
top level section and separate section for custom variables.
⚒️ Fixes  # <!--(issue)-->

**⚙️ 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?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ 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._
This commit is contained in:
Xstar97TheNoob
2023-08-19 11:03:55 +02:00
committed by GitHub
parent a2f8abb004
commit 1a82032819
3 changed files with 223 additions and 199 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/gamevault-backend - https://github.com/truecharts/charts/tree/master/charts/stable/gamevault-backend
- https://github.com/Phalcode/gamevault-backend - https://github.com/Phalcode/gamevault-backend
type: application type: application
version: 1.0.2 version: 1.1.0
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- games - games
+68 -66
View File
@@ -9,47 +9,50 @@ questions:
# Include{podSpec} # Include{podSpec}
# Include{containerMain} # Include{containerMain}
- variable: env # Include{containerBasic}
label: Image Environment # Include{containerAdvanced}
- variable: gamevault
group: App Configuration
label: Gamevault
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: SERVER_ADMIN_USERNAME - variable: server
label: "Server Admin User" label: Server
schema:
additional_attrs: true
type: dict
attrs:
- variable: admin_username
label: Admin User
schema: schema:
type: string type: string
required: true required: true
default: "" default: ""
- variable: SERVER_ADMIN_PASSWORD - variable: admin_password
label: "Server Admin Password" label: Admin Password
schema: schema:
type: string type: string
private: true private: true
required: true required: true
default: "" default: ""
- variable: server - variable: registration_disabled
label: Show Server Settings label: Registration Disabled
description: If registration is enabled or not.
schema: schema:
type: boolean type: boolean
default: false default: false
show_subquestions_if: true - variable: account_activation_disabled
subquestions: label: Account Activation Disabled
- variable: SERVER_REGISTRATION_DISABLED description: If accounts need to be activated by an admin before using them.
label: "Server Registration Disabled"
description: "If registration is enabled or not."
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: SERVER_ACCOUNT_ACTIVATION_DISABLED - variable: allowed_origins
label: "Server Account Activation Disabled" label: Allowed Origins
description: "If accounts need to be activated by an admin before using them." description: List of Allowed CORS origins for the server.
schema:
type: boolean
default: false
- variable: SERVER_CORS_ALLOWED_ORIGINS
label: "Server Cors Allowed Origin"
description: "List of Allowed CORS origins for the server."
schema: schema:
type: list type: list
empty: false empty: false
@@ -57,15 +60,15 @@ questions:
default: default:
- "*" - "*"
items: items:
- variable: cors - variable: origin
label: Cors label: Origin
schema: schema:
type: string type: string
required: true required: true
default: "" default: ""
- variable: SERVER_LOG_LEVEL - variable: log_level
label: "Server Log Level" label: Log Level
description: "The log level of the server." description: The log level of the server.
schema: schema:
type: string type: string
required: true required: true
@@ -81,31 +84,31 @@ questions:
description: "Error" description: "Error"
- value: "fatal" - value: "fatal"
description: "Fatal" description: "Fatal"
- variable: games_images - variable: games
label: Show Games and Images Settings label: Games
schema: schema:
type: boolean additional_attrs: true
default: false type: dict
show_subquestions_if: true attrs:
subquestions: - variable: index_interval_in_minutes
- variable: GAMES_INDEX_INTERVAL_IN_MINUTES label: Index Interval In Minutes
label: "Games Index Interval In Minutes" description: Determines how often the server should index the list of games.
description: "The index interval in minutes. Determines how often the server should index the list of games."
schema: schema:
type: int type: int
default: 5 default: 5
- variable: GAMES_SEARCH_RECURSIVE - variable: search_recursive
label: "Games Search Recursive" label: Search Recursive
description: "Toggling the Indexer's search for games in sub folders." description: Toggling the Indexer's search for games in sub folders.
schema: schema:
type: boolean type: boolean
default: true default: true
- variable: GAMES_SUPPORTED_FILE_FORMATS - variable: file_formats
label: "Games Supported File Formats" label: Supported File Formats
description: "Custom list of file formats." description: Custom list of file formats.
schema: schema:
type: list type: list
empty: false empty: false
required: true
default: default:
- ".7z" - ".7z"
- ".xz" - ".xz"
@@ -145,7 +148,6 @@ questions:
- ".wim" - ".wim"
- ".xar" - ".xar"
- ".z" - ".z"
required: true
items: items:
- variable: format - variable: format
label: Format label: Format
@@ -153,49 +155,49 @@ questions:
type: string type: string
required: true required: true
default: "" default: ""
- variable: IMAGE_GC_KEEP_DAYS - variable: images
label: "Image GC Keep Days" label: Images
description: "The number of days to keep unused images. After this period, images that have not been accessed are deleted." schema:
additional_attrs: true
type: dict
attrs:
- variable: gc_keep_days
label: GC Keep Days
description: The number of days to keep unused images. After this period, images that have not been accessed are deleted.
schema: schema:
type: int type: int
default: 30 default: 30
min: 1 min: 1
- variable: IMAGE_GC_INTERVAL_MINUTES - variable: gc_interval_minutes
label: "Image GC Interval Minutes" label: GC Interval Minutes
description: "How often to run the image garbage collector, in minutes." description: How often to run the image garbage collector, in minutes.
schema: schema:
type: int type: int
default: 60 default: 60
min: 1 min: 1
- variable: rawg - variable: rawg
label: Show RAWG Server Settings label: Rawg
schema: schema:
type: boolean additional_attrs: true
default: false type: dict
show_subquestions_if: true attrs:
subquestions: - variable: api_url
- variable: RAWG_API_URL label: API Url
label: RAWG API Url
schema: schema:
type: string type: string
required: true default: "https://api.rawg.io/api"
default: https://api.rawg.io/api - variable: api_cache_days
- variable: RAWG_API_CACHE_DAYS label: API Cache Days
label: RAWG API Cache Days
schema: schema:
type: int type: int
default: 7 default: 7
min: 1 min: 1
- variable: RAWG_API_KEY - variable: api_key
label: RAWG API Key label: API Key
schema: schema:
type: string type: string
default: "" default: ""
# Include{containerBasic}
# Include{containerAdvanced}
# Include{containerConfig} # Include{containerConfig}
# Include{podOptions} # Include{podOptions}
# Include{serviceRoot} # Include{serviceRoot}
+36 -14
View File
@@ -18,6 +18,28 @@ service:
port: 8080 port: 8080
targetPort: 8080 targetPort: 8080
gamevault:
server:
admin_user: admin
admin_password: password
registration_disabled: false
account_activation_disabled: false
allowed_origins:
- "*"
log_level: info
games:
index_interval_in_minutes: 5
search_recursive: true
file_formats:
- ".7z"
images:
gc_keep_days: 30
gc_interval_minutes: 60
rawg:
api_url: https://api.rawg.io/api
api_cache_days: 7
api_key: ""
workload: workload:
main: main:
podSpec: podSpec:
@@ -52,24 +74,24 @@ workload:
name: cnpg-main-user name: cnpg-main-user
key: password key: password
# ADMIN # ADMIN
SERVER_ADMIN_USERNAME: "admin" SERVER_ADMIN_USERNAME: "{{ .Values.gamevault.server.admin_user }}"
SERVER_ADMIN_PASSWORD: "password" SERVER_ADMIN_PASSWORD: "{{ .Values.gamevault.server.admin_password }}"
SERVER_REGISTRATION_DISABLED: true SERVER_REGISTRATION_DISABLED: "{{ .Values.gamevault.server.registration_disabled }}"
SERVER_ACCOUNT_ACTIVATION_DISABLED: false SERVER_ACCOUNT_ACTIVATION_DISABLED: "{{ .Values.gamevault.server.account_activation_disabled }}"
# SERVER # SERVER
SERVER_LOG_LEVEL: info SERVER_LOG_LEVEL: "{{ .Values.gamevault.server.log_level }}"
SERVER_CORS_ALLOWED_ORIGINS: '{{ join "," .Values.workload.main.podSpec.containers.main.env.SERVER_CORS_ALLOWED_ORIGINS }}' SERVER_CORS_ALLOWED_ORIGINS: '{{ join "," .Values.gamevault.server.allowed_origins }}'
# GAMES # GAMES
GAMES_INDEX_INTERVAL_IN_MINUTES: 5 GAMES_INDEX_INTERVAL_IN_MINUTES: "{{ .Values.gamevault.games.index_interval_in_minutes }}"
GAMES_SEARCH_RECURSIVE: true GAMES_SEARCH_RECURSIVE: "{{ .Values.gamevault.games.search_recursive }}"
GAMES_SUPPORTED_FILE_FORMATS: '{{ join "," .Values.workload.main.podSpec.containers.main.env.GAMES_SUPPORTED_FILE_FORMATS }}' GAMES_SUPPORTED_FILE_FORMATS: '{{ join "," .Values.gamevault.games.file_formats }}'
# IMAGES # IMAGES
IMAGE_GC_KEEP_DAYS: 30 IMAGE_GC_KEEP_DAYS: "{{ .Values.gamevault.images.gc_keep_days }}"
IMAGE_GC_INTERVAL_MINUTES: 60 IMAGE_GC_INTERVAL_MINUTES: "{{ .Values.gamevault.images.gc_interval_minutes }}"
# RAWG # RAWG
RAWG_API_URL: https://api.rawg.io/api RAWG_API_URL: "{{ .Values.gamevault.rawg.api_url }}"
RAWG_API_CACHE_DAYS: 7 RAWG_API_CACHE_DAYS: "{{ .Values.gamevault.rawg.api_cache_days }}"
# RAWG_API_KEY: "" RAWG_API_KEY: "{{ .Values.gamevault.rawg.api_key }}"
persistence: persistence:
logs: logs: