From f87dbd9f3ddf054acdd76b48baa648581b02778c Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 5 Apr 2023 15:09:52 +0000 Subject: [PATCH] added sonarr --- .../templates/configmap-sonarr.yaml | 10 ++++ .../videohosting/templates/deploy-sonarr.yaml | 46 +++++++++++++++++++ .../videohosting/templates/pvc-sonarr.yaml | 15 ++++++ .../videohosting/templates/svc-sonarr.yaml | 13 ++++++ 4 files changed, 84 insertions(+) create mode 100644 k8s/applications/videohosting/templates/configmap-sonarr.yaml create mode 100644 k8s/applications/videohosting/templates/deploy-sonarr.yaml create mode 100644 k8s/applications/videohosting/templates/pvc-sonarr.yaml create mode 100644 k8s/applications/videohosting/templates/svc-sonarr.yaml diff --git a/k8s/applications/videohosting/templates/configmap-sonarr.yaml b/k8s/applications/videohosting/templates/configmap-sonarr.yaml new file mode 100644 index 0000000..30cb24b --- /dev/null +++ b/k8s/applications/videohosting/templates/configmap-sonarr.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sonarr-envs +data: + PUID: "1000" + PGID: "1000" + TZ: {{ .Values.global.timezone }} + \ No newline at end of file diff --git a/k8s/applications/videohosting/templates/deploy-sonarr.yaml b/k8s/applications/videohosting/templates/deploy-sonarr.yaml new file mode 100644 index 0000000..a58ec86 --- /dev/null +++ b/k8s/applications/videohosting/templates/deploy-sonarr.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sonarr +spec: + selector: + matchLabels: + app: sonarr + replicas: 1 + revisionHistoryLimit: 2 + template: + metadata: + labels: + app: sonarr + spec: + containers: + - name: sonarr + image: "{{ .Values.sonarr.repo }}:{{ .Values.sonarr.tag }}" + envFrom: + - configMapRef: + name: sonarr-envs + resources: + limits: + cpu: 2 + memory: "2Gi" + requests: + cpu: 1 + memory: "500M" + ports: + - containerPort: 8989 + volumeMounts: + - name: sonarr-config + mountPath: /config + - name: torrents + mountPath: /data + + volumes: + - name: sonarr-config + persistentVolumeClaim: + claimName: sonarr-config + - name: torrents + nfs: + server: "{{ $.Values.global.nfs.server }}" + path: "{{ .Values.nfs.shares.torrents }}" + readOnly: false diff --git a/k8s/applications/videohosting/templates/pvc-sonarr.yaml b/k8s/applications/videohosting/templates/pvc-sonarr.yaml new file mode 100644 index 0000000..77805eb --- /dev/null +++ b/k8s/applications/videohosting/templates/pvc-sonarr.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + name: sonarr-config +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + limits: + storage: 100Gi diff --git a/k8s/applications/videohosting/templates/svc-sonarr.yaml b/k8s/applications/videohosting/templates/svc-sonarr.yaml new file mode 100644 index 0000000..7d89c81 --- /dev/null +++ b/k8s/applications/videohosting/templates/svc-sonarr.yaml @@ -0,0 +1,13 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: sonarr +spec: + selector: + app: sonarr + type: ClusterIP + ports: + - port: 8989 + targetPort: 8989 + name: "web"