From d5f0e6bbc3d0dc67a64116d379deff54f960b96d Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Sun, 3 Dec 2023 06:29:34 -0500 Subject: [PATCH] fix(gonic) default the storage and fix the main service (#15444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Default the storage by manually specifying the storage options and adding them to the gui; also fixate the main service from defaulting to port 80 internally. ⚒️ Fixes #15376 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 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._ Signed-off-by: Kjeld Schouten Co-authored-by: Kjeld Schouten --- charts/stable/gonic/Chart.yaml | 2 +- charts/stable/gonic/questions.yaml | 32 +++++++++++++++++ charts/stable/gonic/values.yaml | 58 +++++++++++++++++++++--------- 3 files changed, 74 insertions(+), 18 deletions(-) diff --git a/charts/stable/gonic/Chart.yaml b/charts/stable/gonic/Chart.yaml index 0c3fb651f69..bb719545918 100644 --- a/charts/stable/gonic/Chart.yaml +++ b/charts/stable/gonic/Chart.yaml @@ -1,7 +1,7 @@ kubeVersion: '>=1.24.0' apiVersion: v2 name: gonic -version: 10.0.9 +version: 10.1.0 appVersion: 0.16.1 description: Music streaming server / subsonic server API implementation home: https://truecharts.org/charts/stable/gonic diff --git a/charts/stable/gonic/questions.yaml b/charts/stable/gonic/questions.yaml index 7d7e1d2ca4a..d409d642eff 100644 --- a/charts/stable/gonic/questions.yaml +++ b/charts/stable/gonic/questions.yaml @@ -43,6 +43,38 @@ questions: additional_attrs: true type: dict attrs: +# Include{persistenceBasic} + - variable: cache + label: "App Cache Storage" + description: "Stores the Application Cache." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: playlists + label: "App PlayLists Storage" + description: "Stores the Application PlayLists." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: podcast + label: "App Podcast Storage" + description: "Stores the Application Podcast." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: music + label: "App Music Storage" + description: "Stores the Application Music." + schema: + additional_attrs: true + type: dict + attrs: # Include{persistenceBasic} # Include{persistenceList} # Include{ingressRoot} diff --git a/charts/stable/gonic/values.yaml b/charts/stable/gonic/values.yaml index 92e67291ef0..ff7f63e31c1 100644 --- a/charts/stable/gonic/values.yaml +++ b/charts/stable/gonic/values.yaml @@ -2,25 +2,49 @@ image: repository: sentriz/gonic pullPolicy: IfNotPresent tag: v0.16.1@sha256:bad4b20f03399c14398e4f1b72d90406417037c72e9e8777838dab90b3f181af -# env: -# GONIC_MUSIC_PATH: -# GONIC_PODCAST_PATH: -# GONIC_CACHE_PATH: -service: - main: - ports: - main: - port: 10023 - targetPort: 80 -persistence: - data: - enabled: true - mountPath: "/data" -portal: - open: - enabled: true + securityContext: container: runAsNonRoot: false runAsUser: 0 runAsGroup: 0 + +service: + main: + ports: + main: + port: 10023 + +workload: + main: + podSpec: + containers: + main: + env: + GONIC_LISTEN_ADDR: ":{{ .Values.service.main.ports.main.port }}" + GONIC_DB_PATH: "{{ .Values.persistence.data.mountPath }}/gonic.db" + GONIC_CACHE_PATH: "{{ .Values.persistence.cache.mountPath }}" + GONIC_PLAYLISTS_PATH : "{{ .Values.persistence.playlists.mountPath }}" + GONIC_PODCAST_PATH: "{{ .Values.persistence.podcast.mountPath }}" + GONIC_MUSIC_PATH: "{{ .Values.persistence.music.mountPath }}" + +persistence: + data: + enabled: true + mountPath: /data + cache: + enabled: true + mountPath: /cache + playlists: + enabled: true + mountPath: /playlists + podcast: + enabled: true + mountPath: /podcast + music: + enabled: true + mountPath: /music + +portal: + open: + enabled: true