226 lines
5.5 KiB
YAML
226 lines
5.5 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: qbittorrent
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: qbittorrent
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: qbittorrent
|
|
spec:
|
|
containers:
|
|
- name: qbittorrent
|
|
image: linuxserver/qbittorrent:libtorrentv1
|
|
env:
|
|
- name: PUID
|
|
value: "1000"
|
|
- name: PGID
|
|
value: "1000"
|
|
- name: UPDATER_PERIOD
|
|
value: 24h
|
|
volumeMounts:
|
|
- name: qbittorrent-config-volume
|
|
mountPath: /config
|
|
- name: qbittorrent-downloads-volume
|
|
mountPath: /downloads
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- ping
|
|
- 8.8.8.8
|
|
- -I
|
|
- tun0
|
|
- -nqc
|
|
- '1'
|
|
- -W
|
|
- '4'
|
|
periodSeconds: 60
|
|
failureThreshold: 5
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 10
|
|
ports:
|
|
- containerPort: 8080
|
|
- name: gluetun
|
|
image: qmcgaw/gluetun:v3.40.1
|
|
env:
|
|
- name: VPN_PORT_FORWARDING_UP_COMMAND
|
|
value: /bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":$(echo {{PORTS}} | cut -d, -f1),\"random_port\":false,\"upnp\":false}" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1'
|
|
- name: VPN_PORT_FORWARDING_DOWN_COMMAND
|
|
value: /bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":123}" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1'
|
|
- name: VPN_PORT_FORWARDING
|
|
value: "on"
|
|
- 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: 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: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: qbittorrent-http
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
|
spec:
|
|
rules:
|
|
- host: qb.reticulum.lan
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: qbittorrent-svc
|
|
port:
|
|
number: 8080
|
|
- host: qb.argentumcation.com
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: qbittorrent-svc
|
|
port:
|
|
number: 8080
|
|
- host: qb.xn--2dkua.xn--tckwe
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: qbittorrent-svc
|
|
port:
|
|
number: 8080
|
|
---
|
|
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: ""
|
|
|