radarr and sonarr

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-17 11:56:26 +01:00
parent 9339503ed7
commit 09037162e4
13 changed files with 288 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: radarr-config-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: local-path

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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