Initial Commit
This commit is contained in:
commit
fe844b9d04
20 changed files with 661 additions and 0 deletions
108
QBitTorrent/Deployment.yml
Normal file
108
QBitTorrent/Deployment.yml
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: qbittorrent-vpn
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: qbittorrent-vpn
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: qbittorrent-vpn
|
||||
spec:
|
||||
dnsPolicy: "None"
|
||||
dnsConfig:
|
||||
nameservers:
|
||||
- 1.1.1.1
|
||||
- 8.8.8.8
|
||||
containers:
|
||||
- name: openvpn
|
||||
image: dperson/openvpn-client
|
||||
resources:
|
||||
requests:
|
||||
cpu: "128m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
cpu: "256m"
|
||||
memory: "512Mi"
|
||||
command: [
|
||||
"openvpn",
|
||||
"--config",
|
||||
"/vpn/<ovpn file name>",
|
||||
# "--auth-user-pass",
|
||||
# "/vpn/credentials.conf",
|
||||
]
|
||||
volumeMounts:
|
||||
- name: ovpn
|
||||
mountPath: /vpn/<ovpn file name>
|
||||
subPath: <ovpn file name>
|
||||
# - name: ovpn-creds # Only needed if your ovpn file requires a login
|
||||
# mountPath: /vpn/credentials.conf
|
||||
# subPath: credentials.conf
|
||||
- name: tun
|
||||
mountPath: /dev/net/tun
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["NET_ADMIN"]
|
||||
- name: qbittorrent
|
||||
image: linuxserver/qbittorrent
|
||||
resources:
|
||||
requests:
|
||||
cpu: "256m"
|
||||
memory: "256Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "1Gi"
|
||||
env:
|
||||
- name: PUID
|
||||
value: "997"
|
||||
- name: PGID
|
||||
value: "997"
|
||||
- name: TZ
|
||||
value: "Europe/London"
|
||||
ports:
|
||||
- containerPort: 8080 # Web UI
|
||||
#- containerPort: 6881 # Torrent
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: downloads
|
||||
mountPath: /downloads
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: qbittorrent-vpn-config-pvc
|
||||
- name: downloads
|
||||
hostPath:
|
||||
path: </Path/To/Downloads>
|
||||
type: Directory
|
||||
- name: ovpn #create with `kubectl create configmap ovpn-creds --from-file=<ovpn file name>=<ovpn file name>`
|
||||
configMap:
|
||||
name: protonvpn-ovpn-config
|
||||
items:
|
||||
- key: <ovpn file name>
|
||||
path: <ovpn file name>
|
||||
# - name: ovpn-creds
|
||||
# configMap:
|
||||
# name: ovpn-creds
|
||||
# items:
|
||||
# - key: credentials.conf
|
||||
# path: credentials.conf
|
||||
- name: tun
|
||||
hostPath:
|
||||
path: /dev/net/tun
|
||||
type: ""
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: qbittorrent-vpn-config-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 256Mi
|
||||
22
QBitTorrent/Ingress.yml
Normal file
22
QBitTorrent/Ingress.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: qbittorrent-vpn-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-production"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- <qbittorrent URL>
|
||||
secretName: qbittorrent-vpn-tls
|
||||
rules:
|
||||
- host: <qbittorrent URL>
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: qbittorrent-vpn
|
||||
port:
|
||||
number: 8080
|
||||
11
QBitTorrent/Service.yml
Normal file
11
QBitTorrent/Service.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: qbittorrent-vpn
|
||||
spec:
|
||||
selector:
|
||||
app: qbittorrent-vpn
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
Loading…
Add table
Add a link
Reference in a new issue