mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-12-17 03:34:28 +00:00
sonarr added
This commit is contained in:
77
roles/sonarr/files/sonarr-deployment.yaml
Normal file
77
roles/sonarr/files/sonarr-deployment.yaml
Normal file
@ -0,0 +1,77 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sonarr
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sonarr
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sonarr
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: sonarr
|
||||
image: lscr.io/linuxserver/sonarr:4.0.16
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
ports:
|
||||
- containerPort: 8989
|
||||
name: webui
|
||||
env:
|
||||
- name: PUID
|
||||
value: "1013"
|
||||
- name: PGID
|
||||
value: "1013"
|
||||
- name: TZ
|
||||
value: 'Etc/UTC'
|
||||
- name: SONARR__POSTGRES__HOST
|
||||
value: 'stolon-proxy-service.postgresql.svc.cluster.local'
|
||||
- name: SONARR__POSTGRES__USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sonarr-secret
|
||||
key: username
|
||||
- name: SONARR__POSTGRES__PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sonarr-secret
|
||||
key: password
|
||||
- name: SONARR__POSTGRES__MAINDB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sonarr-secret
|
||||
key: maindb
|
||||
- name: SONARR__POSTGRES__LOGDB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sonarr-secret
|
||||
key: logsdb
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: downloads
|
||||
mountPath: /downloads
|
||||
- name: tv
|
||||
mountPath: /tv
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: sonarr-config-pvc
|
||||
- name: downloads
|
||||
persistentVolumeClaim:
|
||||
claimName: qbittorrent-downloads-pvc
|
||||
- name: tv
|
||||
persistentVolumeClaim:
|
||||
claimName: sonarr-tv-pvc
|
||||
|
||||
|
||||
|
||||
|
||||
23
roles/sonarr/files/sonarr-nfs-csi.yaml
Normal file
23
roles/sonarr/files/sonarr-nfs-csi.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: sonarr-nfs-csi
|
||||
namespace: stack-arr
|
||||
provisioner: nfs.csi.k8s.io
|
||||
parameters:
|
||||
server: 192.168.1.22
|
||||
share: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/sonarr
|
||||
allowVolumeExpansion: true
|
||||
reclaimPolicy: Retain
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: sonarr-tv-nfs-csi
|
||||
namespace: stack-arr
|
||||
provisioner: nfs.csi.k8s.io
|
||||
parameters:
|
||||
server: 192.168.1.22
|
||||
share: /mnt/fenix-main-nas-pool-0/data/Filmes_e_Series/TV
|
||||
allowVolumeExpansion: true
|
||||
reclaimPolicy: Retain
|
||||
60
roles/sonarr/files/sonarr-pvcs.yaml
Normal file
60
roles/sonarr/files/sonarr-pvcs.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: sonarr-config-pv
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
capacity:
|
||||
storage: 2Gi
|
||||
storageClassName: sonarr-nfs-csi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
server: 192.168.1.22
|
||||
path: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/sonarr/config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: sonarr-config-pvc
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
storageClassName: sonarr-nfs-csi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeName: sonarr-config-pv
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: sonarr-tv-pv
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
storageClassName: sonarr-tv-nfs-csi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
server: 192.168.1.22
|
||||
path: /mnt/fenix-main-nas-pool-0/data/Filmes_e_Series/TV
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: sonarr-tv-pvc
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
storageClassName: sonarr-tv-nfs-csi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeName: sonarr-tv-pv
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Gi
|
||||
---
|
||||
11
roles/sonarr/files/sonarr-secret.yaml
Normal file
11
roles/sonarr/files/sonarr-secret.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: sonarr-secret
|
||||
namespace: stack-arr
|
||||
type: Opaque
|
||||
data:
|
||||
username: dXNlcm5hbWU=
|
||||
password: cGFzc3dvcmQ=
|
||||
maindb: bWFpbmRiLXByb3dsYXJy
|
||||
logsdb: bG9nZGItcHJvd2xhcnI=
|
||||
12
roles/sonarr/files/sonarr-service.yaml
Normal file
12
roles/sonarr/files/sonarr-service.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sonarr-service
|
||||
namespace: stack-arr
|
||||
spec:
|
||||
ports:
|
||||
- port: 8989
|
||||
targetPort: 8989
|
||||
selector:
|
||||
app: sonarr
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user