From 4910878f1044699711bc952deb610e3da848f2c7 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Sat, 16 Mar 2024 06:24:16 -0400 Subject: [PATCH] fix(airsonic-advanced) fix airsonic-advanced storage and set port automatically + code cleanup (#19207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Clean up the code, fix storage and auto set main port ⚒️ Fixes #19206 **⚙️ 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 - [X] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ 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/airsonic-advanced/Chart.yaml | 2 +- .../stable/airsonic-advanced/questions.yaml | 16 +++------- charts/stable/airsonic-advanced/values.yaml | 30 +++++++++++-------- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/charts/stable/airsonic-advanced/Chart.yaml b/charts/stable/airsonic-advanced/Chart.yaml index 077a48ef22f..40dacbe5332 100644 --- a/charts/stable/airsonic-advanced/Chart.yaml +++ b/charts/stable/airsonic-advanced/Chart.yaml @@ -33,4 +33,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/airsonic-advanced - https://hub.docker.com/r/airsonicadvanced/airsonic-advanced type: application -version: 13.5.2 +version: 13.6.0 diff --git a/charts/stable/airsonic-advanced/questions.yaml b/charts/stable/airsonic-advanced/questions.yaml index dbc43b7c16f..ce0d2c26c28 100644 --- a/charts/stable/airsonic-advanced/questions.yaml +++ b/charts/stable/airsonic-advanced/questions.yaml @@ -17,18 +17,10 @@ questions: type: dict attrs: - variable: JAVA_OPTS - label: "JAVA_OPTS" - description: "JAVA_OPTS" + label: "Java Opts" schema: type: string default: "" - - variable: CONTEXT_PATH - label: "CONTEXT_PATH" - description: "CONTEXT_PATH" - schema: - type: string - required: true - default: "/" # Include{containerBasic} # Include{containerAdvanced} # Include{containerConfig} @@ -84,9 +76,9 @@ questions: type: dict attrs: # Include{persistenceBasic} - - variable: playlist - label: "App Playlist Storage" - description: "Stores the Application Playlist." + - variable: playlists + label: "App Playlists Storage" + description: "Stores the Application Playlists." schema: additional_attrs: true type: dict diff --git a/charts/stable/airsonic-advanced/values.yaml b/charts/stable/airsonic-advanced/values.yaml index b19282f6e21..78832a49e20 100644 --- a/charts/stable/airsonic-advanced/values.yaml +++ b/charts/stable/airsonic-advanced/values.yaml @@ -2,12 +2,18 @@ image: repository: airsonicadvanced/airsonic-advanced tag: edge-latest@sha256:18de305bce05d47a885a40e6fbeecbf26ebc1ea815cedcce4be1f533a39bd3e8 pullPolicy: IfNotPresent + securityContext: container: readOnlyRootFilesystem: false - runAsNonRoot: true - runAsUser: 568 - runAsGroup: 568 + +service: + main: + ports: + main: + port: 10122 + protocol: http + workload: main: podSpec: @@ -21,11 +27,13 @@ workload: startup: type: tcp env: + AIRSONIC_PORT: "{{ .Values.service.main.ports.main.port }}" + # dont expose to GUI + CONTEXT_PATH: "/" + # Set so the persisted dirs use the root path AIRSONIC_DIR: "/" # -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes. - - JAVA_OPTS: - CONTEXT_PATH: "/" + JAVA_OPTS: "" spring_liquibase_parameters_userTableQuote: '"' spring_datasource_username: "{{ .Values.cnpg.main.user }}" spring_datasource_url: @@ -36,19 +44,14 @@ workload: secretKeyRef: name: cnpg-main-user key: password -service: - main: - ports: - main: - port: 10122 - protocol: http - targetPort: 4040 + # Enabled postgres cnpg: main: enabled: true user: airsonic-advanced database: airsonic-advanced + persistence: config: enabled: true @@ -62,6 +65,7 @@ persistence: playlists: enabled: true mountPath: /playlists + portal: open: enabled: true