From eb50530bc71d275a9f803a01bec09b01afc1ed0d Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Sun, 23 Jul 2023 09:50:07 -0400 Subject: [PATCH] fix(lidarr) fix exportarr sidecar and allow the user to disable it. (#10758) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Fix exportarr sidecar and allow the user to disable it by disabling metrics. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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/lidarr/Chart.yaml | 2 +- charts/stable/lidarr/templates/common.yaml | 9 +++++++-- charts/stable/lidarr/values.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/charts/stable/lidarr/Chart.yaml b/charts/stable/lidarr/Chart.yaml index 7a5c7fff4f7..bb211669d99 100644 --- a/charts/stable/lidarr/Chart.yaml +++ b/charts/stable/lidarr/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/lidarr - https://github.com/Lidarr/Lidarr type: application -version: 16.1.0 +version: 16.1.1 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/lidarr/templates/common.yaml b/charts/stable/lidarr/templates/common.yaml index 539b471c1d2..3c93f578611 100644 --- a/charts/stable/lidarr/templates/common.yaml +++ b/charts/stable/lidarr/templates/common.yaml @@ -1,6 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . -}} +{{/* Disable [exportarr] if requested */}} +{{- if not .Values.metrics.main.enabled -}} + {{- $_ := set .Values.workload.exportarr "enabled" false -}} + {{- $_ := set .Values.service.metrics "enabled" false -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.v1.common.loader.apply" . }} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/stable/lidarr/values.yaml b/charts/stable/lidarr/values.yaml index 4d65f2076de..a166bfa1259 100644 --- a/charts/stable/lidarr/values.yaml +++ b/charts/stable/lidarr/values.yaml @@ -85,7 +85,7 @@ workload: env: INTERFACE: 0.0.0.0 PORT: "{{ .Values.service.metrics.ports.metrics.port }}" - URL: "http://localhost:{{ .Values.service.main.ports.main.port }}" + URL: '{{ printf "http://%v:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.main.ports.main.port }}' # additional metrics (slow) # ENABLE_ADDITIONAL_METRICS: false # enable gathering unknown queue items