From 2e656eba356c4b21b53e2fada6a071dda5f95276 Mon Sep 17 00:00:00 2001 From: Mira Date: Fri, 25 Apr 2025 23:34:14 -0400 Subject: [PATCH] add qbittorrent, postgres --- postgres.yaml | 2 + qbittorrent.yaml | 164 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 qbittorrent.yaml diff --git a/postgres.yaml b/postgres.yaml index 881d3ca..1b999cc 100644 --- a/postgres.yaml +++ b/postgres.yaml @@ -17,6 +17,8 @@ spec: labels: app: postgres spec: + securityContext: + runAsUser: 1000 containers: - env: - name: POSTGRES_PASSWORD diff --git a/qbittorrent.yaml b/qbittorrent.yaml new file mode 100644 index 0000000..5ad84bb --- /dev/null +++ b/qbittorrent.yaml @@ -0,0 +1,164 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: qbittorrent +spec: + replicas: 1 + selector: + matchLabels: + app: qbittorrent + template: + metadata: + labels: + app: qbittorrent + spec: + containers: + - name: qbittorrent + image: linuxserver/qbittorrent + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + volumeMounts: + - name: qbittorrent-config-volume + mountPath: /config + - name: qbittorrent-downloads-volume + mountPath: /downloads + ports: + - containerPort: 8080 + - name: gluetun + image: qmcgaw/gluetun + env: + - name: VPN_SERVICE_PROVIDER + value: "protonvpn" + - name: OPENVPN_USER + valueFrom: + secretKeyRef: + name: protonvpn-secrets + key: PROTONVPN_USER + - name: OPENVPN_PASSWORD + valueFrom: + secretKeyRef: + name: protonvpn-secrets + key: PROTONVPN_PASSWORD + - name: SERVER_COUNTRIES + value: "United States" + - name: PORT_FORWARD_ONLY + value: "on" + securityContext: + capabilities: + add: + - NET_ADMIN + volumeMounts: + - name: gluetun-config-volume + mountPath: /gluetun + volumes: + - name: qbittorrent-config-volume + persistentVolumeClaim: + claimName: qbittorrent-config-pvc + - name: qbittorrent-downloads-volume + persistentVolumeClaim: + claimName: qbittorrent-downloads-pvc + - name: gluetun-config-volume + persistentVolumeClaim: + claimName: gluetun-config-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: qbittorrent-svc +spec: + ports: + - port: 8080 + targetPort: 8080 + nodePort: 31080 + type: NodePort + selector: + app: qbittorrent +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: qbittorrent-config-pv +spec: + capacity: + storage: 100Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: "" + nfs: + path: /mnt/raid/00_meta/05_service_config/qbittorrent + server: 192.168.1.146 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: qbittorrent-config-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + volumeName: qbittorrent-config-pv + storageClassName: "" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: qbittorrent-downloads-pv +spec: + capacity: + storage: 100Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: "" + nfs: + path: /mnt/raid/00_meta/01_downloads/ + server: 192.168.1.146 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: qbittorrent-downloads-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + volumeName: qbittorrent-downloads-pv + storageClassName: "" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: gluetun-config-pv +spec: + capacity: + storage: 100Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: "" + nfs: + path: /mnt/raid/00_meta/05_service_config/gluetun + server: 192.168.1.146 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gluetun-config-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + volumeName: gluetun-config-pv + storageClassName: "" +