From bcb2bd28d72e8e6f785116db089a81d116143dbd Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Wed, 8 May 2024 06:15:36 -0700 Subject: [PATCH] Enable sabnzbd --- charts/ombi/templates/deployment.yaml | 26 +++++++++++++++++++++++++- charts/ombi/templates/ingress.yaml | 10 ++++++++++ charts/ombi/templates/service.yaml | 15 +++++++++++++++ charts/ombi/templates/volumes.yaml | 26 ++++++++++++++++++++++++++ charts/ombi/values.yaml | 4 ++++ 5 files changed, 80 insertions(+), 1 deletion(-) diff --git a/charts/ombi/templates/deployment.yaml b/charts/ombi/templates/deployment.yaml index 5e8601c..796e068 100644 --- a/charts/ombi/templates/deployment.yaml +++ b/charts/ombi/templates/deployment.yaml @@ -132,7 +132,28 @@ spec: name: nzbget-config - mountPath: /data/usenet name: usenet-truenas-downloads - {{ end }} + {{ end }} + {{ if .Values.sabnzbd.enabled }} + - name: sabnzbd + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "lscr.io/linuxserver/sabnzbd:latest" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "America/Los_Angeles" + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - mountPath: /config + name: sabnzbd-config + - mountPath: /data/usenet + name: usenet-truenas-downloads + {{ end }} volumes: - name: ombi-config persistentVolumeClaim: @@ -158,6 +179,9 @@ spec: - name: nzbget-config persistentVolumeClaim: claimName: {{include "ombi.fullname" .}}-nzbget-config-pvc + - name: sabnzbd-config + persistentVolumeClaim: + claimName: {{include "ombi.fullname" .}}-sabnzbd-config-pvc - name: usenet-truenas-downloads persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-truenas-usenet-downloads-pvc diff --git a/charts/ombi/templates/ingress.yaml b/charts/ombi/templates/ingress.yaml index b88bcfd..2df8aba 100644 --- a/charts/ombi/templates/ingress.yaml +++ b/charts/ombi/templates/ingress.yaml @@ -98,4 +98,14 @@ spec: name: {{ include "ombi.fullname" . }}-nzbget port: number: {{ .Values.service.nzbgetWebPort }} + - host: sabnzbd.avril + http: + paths: + - path: / + pathType: ImplementationSpecific + backend: + service: + name: {{ include "ombi.fullname" . }}-sabnzbd + port: + number: {{ .Values.service.sabnzbdWebPort }} {{- end }} diff --git a/charts/ombi/templates/service.yaml b/charts/ombi/templates/service.yaml index 4a08c15..c52b99f 100644 --- a/charts/ombi/templates/service.yaml +++ b/charts/ombi/templates/service.yaml @@ -72,3 +72,18 @@ spec: protocol: TCP selector: {{- include "ombi.selectorLabels" . | nindent 4 }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ombi.fullname" . }}-sabnzbd + labels: + {{- include "ombi.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.sabnzbdWebPort }} + targetPort: 8080 + protocol: TCP + selector: + {{- include "ombi.selectorLabels" . | nindent 4 }} diff --git a/charts/ombi/templates/volumes.yaml b/charts/ombi/templates/volumes.yaml index 77d4bcc..e0bad1e 100644 --- a/charts/ombi/templates/volumes.yaml +++ b/charts/ombi/templates/volumes.yaml @@ -188,6 +188,32 @@ spec: --- apiVersion: v1 kind: PersistentVolume +metadata: + name: {{ include "ombi.fullname" . }}-sabnzbd-config-pv +spec: + capacity: + storage: 10M + accessModes: + - ReadWriteMany + nfs: + server: {{ $.Values.volume.configNFSServer }} + path: /mnt/BERTHA/etc/sabnzbd +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "ombi.fullname" . }}-sabnzbd-config-pvc +spec: + storageClassName: "" + volumeName: {{ include "ombi.fullname" . }}-sabnzbd-config-pv + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10M +--- +apiVersion: v1 +kind: PersistentVolume metadata: name: {{ include "ombi.fullname" . }}-truenas-usenet-downloads-pv spec: diff --git a/charts/ombi/values.yaml b/charts/ombi/values.yaml index c667b30..ec72c98 100644 --- a/charts/ombi/values.yaml +++ b/charts/ombi/values.yaml @@ -43,6 +43,7 @@ service: radarrPort: 7878 prowlarrPort: 9696 nzbgetWebPort: 6789 + sabnzbdWebPort: 8080 ingress: enabled: true @@ -107,6 +108,9 @@ prowlarr: nzbget: enabled: true +sabnzbd: + enabled: true + volume: configNFSServer: rassigma.avril dataNFSServer: rasnu2.avril