From 06cb4574568c01165fc8e8889346d9010c37f295 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 9 Jul 2025 20:12:07 +1000 Subject: [PATCH] Rebase Sonarr smb volumes --- services/PVR/Sonarr/_namespace-sonarr.yaml | 4 +++ services/PVR/Sonarr/application-sonarr.yaml | 18 ++++++++++ services/PVR/Sonarr/deployment-sonarr.yaml | 21 ++++++------ services/PVR/Sonarr/ingressroute-sonarr.yaml | 2 +- ...persistentvolume-csismb-sonarr-config.yaml | 33 +++++++++++++++++++ ...ersistentvolume-csismb-sonarr-scratch.yaml | 33 +++++++++++++++++++ ...persistentvolume-csismb-sonarr-series.yaml | 33 +++++++++++++++++++ ...istentvolume-flexvolsmb-sonarr-config.yaml | 19 ----------- ...tentvolumeclaim-csismb-sonarr-config.yaml} | 6 ++-- ...tentvolumeclaim-csismb-sonarr-scratch.yaml | 12 +++++++ ...stentvolumeclaim-csismb-sonarr-series.yaml | 12 +++++++ .../Sonarr/sealedsecret-smb-credentials.yaml | 16 +++++++++ services/PVR/Sonarr/service-sonarr.yaml | 2 +- 13 files changed, 176 insertions(+), 35 deletions(-) create mode 100644 services/PVR/Sonarr/_namespace-sonarr.yaml create mode 100644 services/PVR/Sonarr/application-sonarr.yaml create mode 100644 services/PVR/Sonarr/persistentvolume-csismb-sonarr-config.yaml create mode 100644 services/PVR/Sonarr/persistentvolume-csismb-sonarr-scratch.yaml create mode 100644 services/PVR/Sonarr/persistentvolume-csismb-sonarr-series.yaml delete mode 100644 services/PVR/Sonarr/persistentvolume-flexvolsmb-sonarr-config.yaml rename services/PVR/Sonarr/{persistentvolumeclaim-flexvolsmb-sonarr-config.yaml => persistentvolumeclaim-csismb-sonarr-config.yaml} (59%) create mode 100644 services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-scratch.yaml create mode 100644 services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-series.yaml create mode 100644 services/PVR/Sonarr/sealedsecret-smb-credentials.yaml diff --git a/services/PVR/Sonarr/_namespace-sonarr.yaml b/services/PVR/Sonarr/_namespace-sonarr.yaml new file mode 100644 index 0000000..3e78749 --- /dev/null +++ b/services/PVR/Sonarr/_namespace-sonarr.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: sonarr diff --git a/services/PVR/Sonarr/application-sonarr.yaml b/services/PVR/Sonarr/application-sonarr.yaml new file mode 100644 index 0000000..66ab559 --- /dev/null +++ b/services/PVR/Sonarr/application-sonarr.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: sonarr + namespace: argo-cd +spec: + destination: + namespace: sonarr + server: https://kubernetes.default.svc + project: default + syncPolicy: + automated: {} + syncOptions: + - CreateNamespace=true + sources: + - repoURL: https://code.spamasaurus.com/djpbessems/Kubernetes.K3s.installLog + path: services/PVR/Sonarr + targetRevision: HEAD diff --git a/services/PVR/Sonarr/deployment-sonarr.yaml b/services/PVR/Sonarr/deployment-sonarr.yaml index f047b25..38afe21 100644 --- a/services/PVR/Sonarr/deployment-sonarr.yaml +++ b/services/PVR/Sonarr/deployment-sonarr.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sonarr - namespace: pvr + namespace: sonarr labels: app: sonarr spec: @@ -17,7 +17,6 @@ spec: spec: containers: - name: sonarr - # image: bv11-cr01.bessems.eu/proxy/linuxserver/sonarr:latest image: linuxserver/sonarr:latest imagePullPolicy: Always ports: @@ -25,19 +24,19 @@ spec: containerPort: 8989 volumeMounts: - mountPath: /config - name: flexvolsmb-sonarr-config + name: csismb-sonarr-config - mountPath: /tv - name: flexvolsmb-pvr-series + name: csismb-sonarr-series - mountPath: /downloads - name: smb-pvr-volatile + name: csismb-sonarr-scratch subPath: downloads volumes: - - name: flexvolsmb-sonarr-config + - name: csismb-sonarr-config persistentVolumeClaim: - claimName: flexvolsmb-sonarr-config - - name: flexvolsmb-pvr-series + claimName: csismb-sonarr-config + - name: csismb-sonarr-series persistentVolumeClaim: - claimName: flexvolsmb-pvr-series - - name: smb-pvr-volatile + claimName: csismb-sonarr-series + - name: csismb-sonarr-scratch persistentVolumeClaim: - claimName: smb-pvr-volatile + claimName: csismb-sonarr-scratch diff --git a/services/PVR/Sonarr/ingressroute-sonarr.yaml b/services/PVR/Sonarr/ingressroute-sonarr.yaml index ee7bff5..a7642db 100644 --- a/services/PVR/Sonarr/ingressroute-sonarr.yaml +++ b/services/PVR/Sonarr/ingressroute-sonarr.yaml @@ -2,7 +2,7 @@ apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: sonarr - namespace: pvr + namespace: sonarr spec: entryPoints: - websecure diff --git a/services/PVR/Sonarr/persistentvolume-csismb-sonarr-config.yaml b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-config.yaml new file mode 100644 index 0000000..f3435bc --- /dev/null +++ b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-config.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + annotations: + pv.kubernetes.io/provisioned-by: smb.csi.k8s.io + name: csismb-sonarr-config +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: csismb-sonarr-config + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=911 + - gid=911 + - nobrl + - cache=none + - mfsymlinks + - noserverino # required to prevent data corruption + csi: + driver: smb.csi.k8s.io + # volumeHandle format: {smb-server-address}#{sub-dir-name}#{share-name} + # make sure this value is unique for every share in the cluster + volumeHandle: 192.168.154.195#sonarr#config + volumeAttributes: + source: //192.168.154.195/K3s.Volumes + subDir: sonarr/config + nodeStageSecretRef: + name: smb-credentials + namespace: sonarr diff --git a/services/PVR/Sonarr/persistentvolume-csismb-sonarr-scratch.yaml b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-scratch.yaml new file mode 100644 index 0000000..17a4e0d --- /dev/null +++ b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-scratch.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + annotations: + pv.kubernetes.io/provisioned-by: smb.csi.k8s.io + name: csismb-sonarr-scratch +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: csismb-sonarr-scratch + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=911 + - gid=911 + - nobrl + - cache=none + - mfsymlinks + - noserverino # required to prevent data corruption + csi: + driver: smb.csi.k8s.io + # volumeHandle format: {smb-server-address}#{sub-dir-name}#{share-name} + # make sure this value is unique for every share in the cluster + volumeHandle: 192.168.154.195#sonarr#scratch + volumeAttributes: + source: //192.168.154.195/K3s.Volumes + subDir: pvr/scratch + nodeStageSecretRef: + name: smb-credentials + namespace: sonarr diff --git a/services/PVR/Sonarr/persistentvolume-csismb-sonarr-series.yaml b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-series.yaml new file mode 100644 index 0000000..5b04610 --- /dev/null +++ b/services/PVR/Sonarr/persistentvolume-csismb-sonarr-series.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + annotations: + pv.kubernetes.io/provisioned-by: smb.csi.k8s.io + name: csismb-sonarr-series +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: csismb-sonarr-series + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=911 + - gid=911 + - nobrl + - cache=none + - mfsymlinks + - noserverino # required to prevent data corruption + csi: + driver: smb.csi.k8s.io + # volumeHandle format: {smb-server-address}#{sub-dir-name}#{share-name} + # make sure this value is unique for every share in the cluster + volumeHandle: 192.168.154.195#sonarr#series + volumeAttributes: + source: //192.168.154.195/Public + subDir: Video's/Series + nodeStageSecretRef: + name: smb-credentials + namespace: sonarr diff --git a/services/PVR/Sonarr/persistentvolume-flexvolsmb-sonarr-config.yaml b/services/PVR/Sonarr/persistentvolume-flexvolsmb-sonarr-config.yaml deleted file mode 100644 index 38aba48..0000000 --- a/services/PVR/Sonarr/persistentvolume-flexvolsmb-sonarr-config.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: flexvolsmb-sonarr-config - namespace: pvr -spec: - capacity: - storage: 1Gi - accessModes: - - ReadWriteMany - storageClassName: flexvolsmb-sonarr-config - flexVolume: - driver: mount/smb - secretRef: - name: flexvolsmb-credentials - options: - opts: file_mode=0777,dir_mode=0777,uid=1000,gid=1000,iocharset=utf8,nobrl - server: 192.168.154.195 - share: /K3s.Volumes/sonarr/config diff --git a/services/PVR/Sonarr/persistentvolumeclaim-flexvolsmb-sonarr-config.yaml b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-config.yaml similarity index 59% rename from services/PVR/Sonarr/persistentvolumeclaim-flexvolsmb-sonarr-config.yaml rename to services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-config.yaml index 63a6d3e..be68f73 100644 --- a/services/PVR/Sonarr/persistentvolumeclaim-flexvolsmb-sonarr-config.yaml +++ b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-config.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: flexvolsmb-sonarr-config - namespace: pvr + name: csismb-sonarr-config + namespace: sonarr spec: accessModes: - ReadWriteMany - storageClassName: flexvolsmb-sonarr-config + storageClassName: csismb-sonarr-config resources: requests: storage: 1Gi diff --git a/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-scratch.yaml b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-scratch.yaml new file mode 100644 index 0000000..245fb26 --- /dev/null +++ b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-scratch.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: csismb-sonarr-scratch + namespace: sonarr +spec: + accessModes: + - ReadWriteMany + storageClassName: csismb-sonarr-scratch + resources: + requests: + storage: 1Gi diff --git a/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-series.yaml b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-series.yaml new file mode 100644 index 0000000..cb75b67 --- /dev/null +++ b/services/PVR/Sonarr/persistentvolumeclaim-csismb-sonarr-series.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: csismb-sonarr-series + namespace: sonarr +spec: + accessModes: + - ReadWriteMany + storageClassName: csismb-sonarr-series + resources: + requests: + storage: 1Gi diff --git a/services/PVR/Sonarr/sealedsecret-smb-credentials.yaml b/services/PVR/Sonarr/sealedsecret-smb-credentials.yaml new file mode 100644 index 0000000..2a9eb55 --- /dev/null +++ b/services/PVR/Sonarr/sealedsecret-smb-credentials.yaml @@ -0,0 +1,16 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: smb-credentials + namespace: sonarr +spec: + encryptedData: + password: AgArfIJJFIeJ35XvPXhlcZl7PMP9m68JDwAcPZvx62oxYGVNnVks73RCAgfb1Bc2cUcc8l3iDXU7VwEVBxgSJkuOJCKkq9X7C2d7RydIJwXzh1EqIynO8Xjt3oNsCTzuKBoOWjgVxsQz5fC21ZX02iI7SBLKUDcuBJeU9mWMF1r606vilALB3E9OXPVZl+qMJaORilFSHljMF3k18K+Ev26xLBBFyxzuNifjZtHaSN0Ly5AFfctQeOKI/uH6fhZKcbWsGQvFvDs3yKfMRSNn5+Bn9LQ3UbNpKX9ihMQKDEgUeaq0WkZdFi430O4u9jbr3OmT/aLnLFDx5Z+BTn5MEJO3mxTksEMnx8phWCRImd54cYZNHWMn0ZMgMOgMgjm1OTaXMWh54SqsIC33OZGwMShuLGjsrf+xnnG4SslZ8oIqDtw6pnW8uwfgShZ2HjplcnCHKt3VHC8avYPweu9lquZHLm2aP/SAT8+shFwS/tGXbRJb2TxfHS3qVRh+8yWB0sff9kasTrZlUT+kEmJCAUWqQp7qNifivAn22kPX7E5XSIaGiLfbP/Se9v/Q13wz8tqjeLs7BVIz2p05oFi0XOlUlKiS9zZXRRQIDjTSqQinA5gcFpzNRmOoMwPTkGP9t0aTC/NEVXf06ik66Go5U/G1He5lTFOkk6N6UDHprEapgUkydnv/u8jhI49qGDnIB3/RgQFNMTcaCQmm8DMu7AJR + username: AgAsrDTZbDn4jszTzh1XpD/AcxGPYNLDJgUg17XfOt7l2D1TreS2GHR2IxCy24lEPkBlDS2p3eHoP+bVTE/PWG3oxaUNyKUxZ4kXihl0aUqEpR5ydcKd3Iu28ClK9QJK00XIQsjA4aUF22nUT54bVHWg0pHzhU4MA2LBi9S9Y15X1uTTOdY8sVt5WdBnLoKjgU+qJEuYxW2EGMhI8aS7DIAD8JLjxfhxwnm79DNvL+gUv9Vii1D8vXvoC+upoHJS8ggOCbad+9igu9CtfHziurcEBinE1VbxZfJcBGSWPogBIGaKbRrIRfBXcyixLH4MIyfRMIf3OsRynOUf5hJhinGq8xfLqhadLL5rXvqMupwHcQtLTBG2aPdlW0kCqvSerX+uNZtocwOms4CyN7i+8O2o+VTxHNuocNiEXlVfGSt8cljRNHpgACa4D+XvkCMG8KGBxWtGXXAEGGL9yeNC3DZgdZRuzZkHZpe6gdEOAKC6Mu8Bu9wTYN3gN4yA2id4U8H3L7a6dCUTdjn7cenhXYj41/6vMprrr4oUO46O+F4BUcEF6H/Taifc2aGxg0QrPBh7bMvlQHvTwNlk/yswGUhPz/JhlES/ypSpa/XvKkqNuJtAUbDBqOgb85XKuuwUhXEcpQakZLSaDUmDxUDCxW4qM3DQ81u6dKWkcVwIKtiXk4RMyTbTkMnRP9+Z9uDVkhn6qVq7sDk= + template: + metadata: + creationTimestamp: null + name: smb-credentials + namespace: sonarr + type: Opaque diff --git a/services/PVR/Sonarr/service-sonarr.yaml b/services/PVR/Sonarr/service-sonarr.yaml index 503bf5a..5dbe85a 100644 --- a/services/PVR/Sonarr/service-sonarr.yaml +++ b/services/PVR/Sonarr/service-sonarr.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: sonarr - namespace: pvr + namespace: sonarr spec: ports: - protocol: TCP