mirror of
https://github.com/michaelthomson0797/fleet-infra.git
synced 2026-02-04 21:09:58 +00:00
qbittorrent
This commit is contained in:
91
media/qbittorrent/deployment.yaml
Normal file
91
media/qbittorrent/deployment.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: qbittorrent
|
||||
namespace: media
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: qbittorrent
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: qbittorrent
|
||||
spec:
|
||||
containers:
|
||||
- name: qbittorrent
|
||||
image: lscr.io/linuxserver/qbittorrent:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: qbittorrent-config
|
||||
optional: false
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 6881
|
||||
name: udp
|
||||
protocol: UDP
|
||||
- containerPort: 6881
|
||||
name: tcp
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: qbittorrent-config
|
||||
mountPath: /config
|
||||
- mountPath: /data/downloads
|
||||
name: data
|
||||
subPath: downloads
|
||||
- name: wireguard
|
||||
image: lscr.io/linuxserver/wireguard:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: wireguard-config
|
||||
optional: false
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
- SYS_MODULE
|
||||
privileged: true
|
||||
ports:
|
||||
- containerPort: 51820
|
||||
name: tun
|
||||
protocol: UDP
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command: ['cp', '/wireguard-secret/deluge.conf', '/config/wg_confs/wg0.conf']
|
||||
volumeMounts:
|
||||
- name: wireguard-config
|
||||
mountPath: /config
|
||||
- name: wireguard-secret
|
||||
readOnly: true
|
||||
mountPath: /wireguard-secret
|
||||
initContainers:
|
||||
- name: init-media-filesystem
|
||||
image: busybox
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p -v /data/downloads/movies /data/downloads/tv /data/downloads/books /data/downloads/audiobooks /data/media/movies /data/media/tv /data/media/books /data/media/audiobooks
|
||||
chown -R 1000:1000 /data
|
||||
chmod -R a=,a+rX,u+w,g+w /data
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
volumes:
|
||||
- name: qbittorrent-config
|
||||
persistentVolumeClaim:
|
||||
claimName: qbittorrent-config
|
||||
- name: wireguard-config
|
||||
persistentVolumeClaim:
|
||||
claimName: wireguard-config
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: media-data
|
||||
- name: wireguard-secret
|
||||
secret:
|
||||
secretName: wireguard-secret
|
||||
|
||||
|
||||
12
media/qbittorrent/dns-endpoint.yaml
Normal file
12
media/qbittorrent/dns-endpoint.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: qbittorrent.michaelthomson.dev
|
||||
namespace: media
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: qbittorrent.michaelthomson.dev
|
||||
recordTTL: 180
|
||||
recordType: CNAME
|
||||
targets:
|
||||
- server.michaelthomson.dev
|
||||
25
media/qbittorrent/ingress.yaml
Normal file
25
media/qbittorrent/ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: qbittorrent
|
||||
namespace: media
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
spec:
|
||||
rules:
|
||||
- host: qbittorrent.michaelthomson.dev
|
||||
http:
|
||||
paths:
|
||||
- pathType: ImplementationSpecific
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: qbittorrent
|
||||
port:
|
||||
name: http
|
||||
tls:
|
||||
- hosts:
|
||||
- qbittorrent.michaelthomson.dev
|
||||
secretName: letsencrypt-wildcard-cert-michaelthomson.dev
|
||||
12
media/qbittorrent/pvc-qbittorrent-config.yaml
Normal file
12
media/qbittorrent/pvc-qbittorrent-config.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: qbittorrent-config
|
||||
namespace: media
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
12
media/qbittorrent/pvc-wireguard-config.yaml
Normal file
12
media/qbittorrent/pvc-wireguard-config.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: wireguard-config
|
||||
namespace: media
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
8
media/qbittorrent/qbittorrent-config.yaml
Normal file
8
media/qbittorrent/qbittorrent-config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: qbittorrent-config
|
||||
namespace: media
|
||||
data:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
12
media/qbittorrent/service.yaml
Normal file
12
media/qbittorrent/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: qbittorrent
|
||||
namespace: media
|
||||
spec:
|
||||
selector:
|
||||
app: qbittorrent
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
name: http
|
||||
8
media/qbittorrent/wireguard-config.yaml
Normal file
8
media/qbittorrent/wireguard-config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: wireguard-config
|
||||
namespace: media
|
||||
data:
|
||||
PUID: "1000"
|
||||
PGID: "1000"
|
||||
14
media/qbittorrent/wireguard-secret.yaml
Normal file
14
media/qbittorrent/wireguard-secret.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
kind: SealedSecret
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
metadata:
|
||||
name: wireguard-secret
|
||||
namespace: media
|
||||
creationTimestamp:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: wireguard-secret
|
||||
namespace: media
|
||||
creationTimestamp:
|
||||
encryptedData:
|
||||
deluge.conf: AgAGasaRn64/JK2L1t1mQWRnxtjAUTgRR0vv/MQpWRnPoPHHD4lh2Uc2w7PIASILKgRmQRcSavsV8JRd3B5qDe/NBiSM6zhBpDMssmKPx1cTCQBsjd3tpAZiFd9dRuImFLTPYh7Z4KFSx34ljWI5m4W6H9rszJ5XaZuRwOrM2gwuD0EXVUZvBrts8nPT+9iV77JdXClHNKtNLuSjkfrcT9gUJspP1SfFi+4/A0lw0nYpugipJt35VraWTQqXtklh+vHBZEAg/mwEK2OnYjqWjgS1m1Jy2JFkBpojf0xe8RvzplDdHGuZFNMVOK1kxQDZB1eCNAAfg4gF969OR2CmN/yzidVYaCKjnhGDBtH2lHJ6yglxDHq+8Psl5cX4UBICaicVcUk7uKN8HjaIDJa58BnYnM3pq+xZM5Uxgf8z9ueSsMjeNneCmE8xMxJnUhbJSrYK/olIdmgil+amOy6oOT1CMXL2aEpu0zMIoNeO2Wmps63UWnB9HCw2AWv9jddEjJ/lm+rx/pDXD0fTqFyPdWvkGNeW5dZc3wri8a89bJAB1grO1+epQagI8Q2XhCIk/hUNOL828I+nuW/2c/dqlCQzPMzzAu5IrofYSut0/Olfw2lX+Cv2qTHZAumjNnbfBHc0AMWlxMBIHRPIDFRkNkx64861IQ32UAiChtYMWTa+ExWD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