fix(prowlarr): Change prowlarr exportarr pod into a sidecar container (#25111)

**Description**

Prowlarr helm chart and other Arrs implementing a exportarr pod can fail
when deployed on a multi node cluster when the pods are provisioned on
different nodes. This is because both mount the config PVC which is in
ReadWriteOnce accessModes by default which only allows mounting on the
same node.

Fixes #25130

The solution I chose is to convert the exportarr pod into a sidecar
container. I choose this approach for simplicity.

If this is not acceptable I will gladly change the approach and create a
new PR and create one for each other affected Arr chart.

**⚙️ 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?**

Deployed on my home lab.

**📃 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
- [ ] ⬆️ 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._

---------

Signed-off-by: alfi0812 <43101280+alfi0812@users.noreply.github.com>
Co-authored-by: alfi0812 <43101280+alfi0812@users.noreply.github.com>
This commit is contained in:
Felix von Arx 2024-08-26 21:53:30 +02:00 committed by GitHub
parent 1adc61ca1e
commit a9bc88418b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 106 additions and 176 deletions

View File

@ -38,4 +38,4 @@ sources:
- https://github.com/morpheus65535/bazarr
- https://github.com/truecharts/charts/tree/master/charts/stable/bazarr
type: application
version: 21.1.3
version: 21.1.4

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -14,26 +14,19 @@ service:
protocol: http
targetPort: 6767
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 7879
targetSelector: exportarr
workload:
exportarr:
enabled: "{{ .Values.metrics.main.enabled }}"
type: Deployment
strategy: RollingUpdate
replicas: 1
main:
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- bazarr
@ -66,7 +59,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -35,4 +35,4 @@ sources:
- https://github.com/Lidarr/Lidarr
- https://github.com/truecharts/charts/tree/master/charts/stable/lidarr
type: application
version: 23.2.2
version: 23.2.3

View File

@ -0,0 +1,3 @@
metrics:
main:
enabled: true

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -15,14 +15,12 @@ service:
main:
port: 8686
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 8687
targetSelector: exportarr
workload:
main:
podSpec:
@ -44,16 +42,8 @@ workload:
env:
LIDARR__PORT: "{{ .Values.service.main.ports.main.port }}"
LIDARR__AUTHENTICATION_METHOD: ""
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- lidarr
@ -89,7 +79,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -36,4 +36,4 @@ sources:
- https://github.com/k8s-at-home/container-images
- https://github.com/truecharts/charts/tree/master/charts/stable/prowlarr
type: application
version: 18.3.1
version: 18.3.2

View File

@ -0,0 +1,3 @@
metrics:
main:
enabled: true

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -15,14 +15,12 @@ service:
main:
port: 9696
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 9697
targetSelector: exportarr
workload:
main:
podSpec:
@ -38,16 +36,8 @@ workload:
env:
PROWLARR__PORT: "{{ .Values.service.main.ports.main.port }}"
PROWLARR__AUTHENTICATION_METHOD: ""
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- prowlarr
@ -87,7 +77,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -35,4 +35,4 @@ sources:
- https://github.com/Radarr/Radarr
- https://github.com/truecharts/charts/tree/master/charts/stable/radarr
type: application
version: 23.4.0
version: 23.4.1

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -15,14 +15,12 @@ service:
main:
port: 7878
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 7879
targetSelector: exportarr
workload:
main:
podSpec:
@ -43,16 +41,8 @@ workload:
path: /ping
env:
RADARR__PORT: "{{ .Values.service.main.ports.main.port }}"
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- radarr
@ -88,7 +78,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -38,4 +38,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/readarr
- https://readarr.com
type: application
version: 23.1.4
version: 23.1.5

View File

@ -0,0 +1,3 @@
metrics:
main:
enabled: true

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -15,14 +15,12 @@ service:
main:
port: 8787
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 8788
targetSelector: exportarr
workload:
main:
podSpec:
@ -44,16 +42,8 @@ workload:
env:
READARR__PORT: "{{ .Values.service.main.ports.main.port }}"
READARR__AUTHENTICATION_METHOD: "None"
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- readarr
@ -89,7 +79,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -35,4 +35,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/rtorrent-rutorrent
- https://truecharts.org/charts/stable/rtorrent-rutorrent
type: application
version: 6.1.4
version: 6.1.5

View File

@ -0,0 +1,3 @@
metrics:
main:
enabled: true

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -57,14 +57,12 @@ service:
enabled: true
port: 50000
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 9135
targetSelector: exportarr
workload:
main:
@ -91,17 +89,8 @@ workload:
XMLRPC_PORT: "{{ .Values.service.xmlrpc.ports.xmlrpc.port }}"
WEBDAV_PORT: "{{ .Values.service.webdav.ports.webdav.port }}"
RT_INC_PORT: "{{ .Values.service.rtinc.ports.rtinc.port }}"
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- --rtorrent.scrape-uri={{ printf "http://%s-xmlrpc.%s:%v/RPC2/" .Release.Name .Release.Namespace .Values.service.xmlrpc.ports.xmlrpc.port }}

View File

@ -34,4 +34,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/sabnzbd
- https://sabnzbd.org/
type: application
version: 21.1.5
version: 21.1.6

View File

@ -0,0 +1,9 @@
metrics:
main:
enabled: false
type: "servicemonitor"
endpoints:
- port: metrics
path: /metrics
prometheusRule:
enabled: false

View File

@ -12,14 +12,12 @@ service:
main:
port: 10097
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 8990
targetSelector: exportarr
workload:
main:
podSpec:
@ -28,16 +26,8 @@ workload:
env:
SABNZBD__HOST_WHITELIST_ENTRIES: ""
SABNZBD__PORT: "{{ .Values.service.main.ports.main.port }}"
exportarr:
enabled: "{{ .Values.metrics.main.enabled }}"
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- sabnzbd
@ -69,7 +59,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true

View File

@ -35,4 +35,4 @@ sources:
- https://github.com/Sonarr/Sonarr
- https://github.com/truecharts/charts/tree/master/charts/stable/sonarr
type: application
version: 23.1.5
version: 23.1.6

View File

@ -1,11 +1 @@
{{/* Make sure all variables are set properly */}}
{{- 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.all" . }}

View File

@ -12,14 +12,12 @@ service:
main:
port: 8989
metrics:
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
type: ClusterIP
targetSelector: exportarr
ports:
metrics:
enabled: true
port: 8990
targetSelector: exportarr
workload:
main:
podSpec:
@ -41,16 +39,8 @@ workload:
env:
SONARR__PORT: "{{ .Values.service.main.ports.main.port }}"
SONARR__AUTHENTICATION_METHOD: ""
exportarr:
enabled: true
type: Deployment
strategy: RollingUpdate
replicas: 1
podSpec:
containers:
exportarr:
primary: true
enabled: true
enabled: "{{ .Values.metrics.main.enabled }}"
imageSelector: exportarrImage
args:
- sonarr
@ -86,7 +76,6 @@ persistence:
main:
main:
mountPath: /config
exportarr:
exportarr:
mountPath: /config
readOnly: true