From 09037162e45b4c6f8c0cd21055a54ca822952710 Mon Sep 17 00:00:00 2001 From: Martyn Ranyard Date: Fri, 17 Nov 2023 11:56:26 +0100 Subject: [PATCH] radarr and sonarr Signed-off-by: Martyn Ranyard --- apps-kustomized/radarr/deploy.yaml | 42 ++++++++++++++++ apps-kustomized/radarr/pvc-smb.yaml | 23 +++++++++ apps-kustomized/radarr/pvc.yaml | 11 +++++ apps-kustomized/radarr/svc.yaml | 15 ++++++ .../smb-storageclasses/sc-films.yaml | 17 +++++++ .../smb-storageclasses/sc-oldseries.yaml | 17 +++++++ .../smb-storageclasses/sc-series.yaml | 17 +++++++ apps-kustomized/sonarr/deploy.yaml | 49 +++++++++++++++++++ apps-kustomized/sonarr/pvc-smb.yaml | 35 +++++++++++++ apps-kustomized/sonarr/pvc.yaml | 13 +++++ apps-kustomized/sonarr/svc.yaml | 15 ++++++ everything-app/radarr.yaml | 17 +++++++ everything-app/sonarr.yaml | 17 +++++++ 13 files changed, 288 insertions(+) create mode 100644 apps-kustomized/radarr/deploy.yaml create mode 100644 apps-kustomized/radarr/pvc-smb.yaml create mode 100644 apps-kustomized/radarr/pvc.yaml create mode 100644 apps-kustomized/radarr/svc.yaml create mode 100644 apps-kustomized/smb-storageclasses/sc-films.yaml create mode 100644 apps-kustomized/smb-storageclasses/sc-oldseries.yaml create mode 100644 apps-kustomized/smb-storageclasses/sc-series.yaml create mode 100644 apps-kustomized/sonarr/deploy.yaml create mode 100644 apps-kustomized/sonarr/pvc-smb.yaml create mode 100644 apps-kustomized/sonarr/pvc.yaml create mode 100644 apps-kustomized/sonarr/svc.yaml create mode 100644 everything-app/radarr.yaml create mode 100644 everything-app/sonarr.yaml diff --git a/apps-kustomized/radarr/deploy.yaml b/apps-kustomized/radarr/deploy.yaml new file mode 100644 index 0000000..c01ee8e --- /dev/null +++ b/apps-kustomized/radarr/deploy.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: radarr + name: radarr +spec: + replicas: 1 + selector: + matchLabels: + app: radarr + template: + metadata: + creationTimestamp: null + labels: + app: radarr + spec: + containers: + - image: hotio/radarr:release + imagePullPolicy: IfNotPresent + name: radarr + ports: + - containerPort: 7878 + name: http + protocol: TCP + volumeMounts: + - mountPath: /config + name: config + - mountPath: /data + name: data + - mountPath: /films + name: films + volumes: + - name: config + persistentVolumeClaim: + claimName: radarr-config-data + - name: films + persistentVolumeClaim: + claimName: smb-films + - name: data + persistentVolumeClaim: + claimName: smb-usenet diff --git a/apps-kustomized/radarr/pvc-smb.yaml b/apps-kustomized/radarr/pvc-smb.yaml new file mode 100644 index 0000000..321caba --- /dev/null +++ b/apps-kustomized/radarr/pvc-smb.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: smb-films +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: smb-films +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: smb-usenet +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: smb-usenet diff --git a/apps-kustomized/radarr/pvc.yaml b/apps-kustomized/radarr/pvc.yaml new file mode 100644 index 0000000..8c7a012 --- /dev/null +++ b/apps-kustomized/radarr/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: radarr-config-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: local-path diff --git a/apps-kustomized/radarr/svc.yaml b/apps-kustomized/radarr/svc.yaml new file mode 100644 index 0000000..91fe71b --- /dev/null +++ b/apps-kustomized/radarr/svc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + external-dns.alpha.kubernetes.io/hostname: radarr.martyn.berlin + labels: + app: radarr + name: radarr +spec: + ports: + - targetPort: 7878 + port: 80 + selector: + app: radarr + type: LoadBalancer diff --git a/apps-kustomized/smb-storageclasses/sc-films.yaml b/apps-kustomized/smb-storageclasses/sc-films.yaml new file mode 100644 index 0000000..8b95f9b --- /dev/null +++ b/apps-kustomized/smb-storageclasses/sc-films.yaml @@ -0,0 +1,17 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: smb-films +provisioner: smb.csi.k8s.io +parameters: + source: "//172.20.0.24/data" + csi.storage.k8s.io/node-stage-secret-name: smb-creds + csi.storage.k8s.io/node-stage-secret-namespace: kube-system +reclaimPolicy: Retain +volumeBindingMode: Immediate +mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=1001 + - gid=1001 + - noperm diff --git a/apps-kustomized/smb-storageclasses/sc-oldseries.yaml b/apps-kustomized/smb-storageclasses/sc-oldseries.yaml new file mode 100644 index 0000000..7f407db --- /dev/null +++ b/apps-kustomized/smb-storageclasses/sc-oldseries.yaml @@ -0,0 +1,17 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: smb-oldseries +provisioner: smb.csi.k8s.io +parameters: + source: "//172.20.0.29/data" + csi.storage.k8s.io/node-stage-secret-name: smb-creds + csi.storage.k8s.io/node-stage-secret-namespace: kube-system +reclaimPolicy: Retain +volumeBindingMode: Immediate +mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=1001 + - gid=1001 + - noperm diff --git a/apps-kustomized/smb-storageclasses/sc-series.yaml b/apps-kustomized/smb-storageclasses/sc-series.yaml new file mode 100644 index 0000000..7d5d6ee --- /dev/null +++ b/apps-kustomized/smb-storageclasses/sc-series.yaml @@ -0,0 +1,17 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: smb-series +provisioner: smb.csi.k8s.io +parameters: + source: "//172.20.0.60/data" + csi.storage.k8s.io/node-stage-secret-name: smb-creds + csi.storage.k8s.io/node-stage-secret-namespace: kube-system +reclaimPolicy: Retain +volumeBindingMode: Immediate +mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=1001 + - gid=1001 + - noperm diff --git a/apps-kustomized/sonarr/deploy.yaml b/apps-kustomized/sonarr/deploy.yaml new file mode 100644 index 0000000..ed97892 --- /dev/null +++ b/apps-kustomized/sonarr/deploy.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: sonarr + name: sonarr +spec: + selector: + matchLabels: + app: sonarr + template: + metadata: + labels: + app: sonarr + spec: + containers: + - image: hotio/sonarr:release + imagePullPolicy: IfNotPresent + name: sonarr + ports: + - containerPort: 8989 + name: http + protocol: TCP + volumeMounts: + - mountPath: /config + name: config + - mountPath: /data + name: data + - mountPath: /series + name: series + - mountPath: /oldseries + name: oldseries + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 + volumes: + - name: config + persistentVolumeClaim: + claimName: sonarr-config-data + - name: series + persistentVolumeClaim: + claimName: smb-series + - name: oldseries + persistentVolumeClaim: + claimName: smb-oldseries + - name: data + persistentVolumeClaim: + claimName: smb-usenet diff --git a/apps-kustomized/sonarr/pvc-smb.yaml b/apps-kustomized/sonarr/pvc-smb.yaml new file mode 100644 index 0000000..8ceae65 --- /dev/null +++ b/apps-kustomized/sonarr/pvc-smb.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: smb-series +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: smb-series +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: smb-oldseries +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: smb-oldseries +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: smb-usenet +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: smb-usenet diff --git a/apps-kustomized/sonarr/pvc.yaml b/apps-kustomized/sonarr/pvc.yaml new file mode 100644 index 0000000..fd19c49 --- /dev/null +++ b/apps-kustomized/sonarr/pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/instance: sonarr + name: sonarr-config-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: local-path diff --git a/apps-kustomized/sonarr/svc.yaml b/apps-kustomized/sonarr/svc.yaml new file mode 100644 index 0000000..63ec4ca --- /dev/null +++ b/apps-kustomized/sonarr/svc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + external-dns.alpha.kubernetes.io/hostname: sonarr.martyn.berlin + labels: + app: sonarr + name: sonarr +spec: + ports: + - targetPort: 8989 + port: 80 + selector: + app: sonarr + type: LoadBalancer diff --git a/everything-app/radarr.yaml b/everything-app/radarr.yaml new file mode 100644 index 0000000..2417eff --- /dev/null +++ b/everything-app/radarr.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: radarr + namespace: argocd +spec: + destination: + namespace: radarr + server: https://kubernetes.default.svc + project: apps + source: + path: apps-kustomized/radarr + repoURL: https://git.martyn.berlin/martyn/infra4talos + targetRevision: HEAD + syncPolicy: + automated: + selfHeal: true diff --git a/everything-app/sonarr.yaml b/everything-app/sonarr.yaml new file mode 100644 index 0000000..8d5ba78 --- /dev/null +++ b/everything-app/sonarr.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: sonarr + namespace: argocd +spec: + destination: + namespace: sonarr + server: https://kubernetes.default.svc + project: apps + source: + path: apps-kustomized/sonarr + repoURL: https://git.martyn.berlin/martyn/infra4talos + targetRevision: HEAD + syncPolicy: + automated: + selfHeal: true