From e6b97940d7c3d31b6550fd9886f2bcec3a09173e Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Sun, 23 Jul 2023 09:50:38 -0400 Subject: [PATCH] fix(readarr) fix exportarr sidecar and allow the user to disable it. (#10760) 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/readarr/Chart.yaml | 2 +- charts/stable/readarr/templates/common.yaml | 9 +++++++-- charts/stable/readarr/values.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/charts/stable/readarr/Chart.yaml b/charts/stable/readarr/Chart.yaml index 8a63ba5830f..06c6c850a1b 100644 --- a/charts/stable/readarr/Chart.yaml +++ b/charts/stable/readarr/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://github.com/Readarr/Readarr - https://readarr.com type: application -version: 16.1.0 +version: 16.1.1 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/readarr/templates/common.yaml b/charts/stable/readarr/templates/common.yaml index 539b471c1d2..3c93f578611 100644 --- a/charts/stable/readarr/templates/common.yaml +++ b/charts/stable/readarr/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/readarr/values.yaml b/charts/stable/readarr/values.yaml index 15349c23053..ad3128f2d52 100644 --- a/charts/stable/readarr/values.yaml +++ b/charts/stable/readarr/values.yaml @@ -84,7 +84,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