feature/transmission-with-vpn #5
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
|
kind: ImagePolicy
|
||||||
|
metadata:
|
||||||
|
name: tranmission
|
||||||
|
namespace: plex-and-tools
|
||||||
|
spec:
|
||||||
|
imageRepositoryRef:
|
||||||
|
name: tranmission
|
||||||
|
policy:
|
||||||
|
semver:
|
||||||
|
range: '4.*.*'
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
|
kind: ImageRepository
|
||||||
|
metadata:
|
||||||
|
name: tranmission
|
||||||
|
namespace: plex-and-tools
|
||||||
|
spec:
|
||||||
|
image: ghcr.io/linuxserver/transmission
|
||||||
|
interval: 24h
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn
|
||||||
|
namespace: plex-and-tools
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`transmission.example.org`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: transmission-with-vpn
|
||||||
|
port: http
|
||||||
|
middlewares:
|
||||||
|
- name: security
|
||||||
|
namespace: traefik
|
||||||
|
- name: authentik-proxy
|
||||||
|
namespace: authentik
|
||||||
|
|
||||||
|
- match: Host(`transmission.example.org`) && PathPrefix(`/outpost.goauthentik.io/`)
|
||||||
|
priority: 15
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: authentik-proxy
|
||||||
|
namespace: authentik
|
||||||
|
port: http
|
||||||
|
middlewares:
|
||||||
|
- name: security
|
||||||
|
namespace: traefik
|
||||||
|
|
||||||
|
tls:
|
||||||
|
secretName: transmission.example.org
|
||||||
|
options:
|
||||||
|
name: tls-security
|
||||||
|
namespace: traefik
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn-gluetun
|
||||||
|
namespace: plex-and-tools
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
data:
|
||||||
|
# See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
|
||||||
|
|
||||||
|
### cyberghost ###
|
||||||
|
# https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/cyberghost.md
|
||||||
|
VPN_SERVICE_PROVIDER: 'cyberghost'
|
||||||
|
OPENVPN_USER: 'example'
|
||||||
|
OPENVPN_PASSWORD: 'example'
|
||||||
|
SERVER_COUNTRIES: 'Germany'
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn
|
||||||
|
namespace: plex-and-tools
|
||||||
|
annotations:
|
||||||
|
reloader.stakater.com/auto: 'true'
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate # because of iptables rules + torrent downloads
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 120 # to ensure that ip rules get deleted clean
|
||||||
|
containers:
|
||||||
|
- name: gluetun
|
||||||
|
# https://hub.docker.com/r/qmcgaw/gluetun
|
||||||
|
image: qmcgaw/gluetun:v3.40.0 # {"$imagepolicy": "plex-and-tools:gluetun"}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
# https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/kubernetes.md#adding-ipv6-rule--file-exists
|
||||||
|
lifecycle:
|
||||||
|
postStart:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
[
|
||||||
|
'/bin/sh',
|
||||||
|
'-c',
|
||||||
|
'(ip rule del table 51820; ip -6 rule del table 51820) || true',
|
||||||
|
]
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
requests:
|
||||||
|
memory: 1Gi
|
||||||
|
cpu: 10m
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: transmission-with-vpn-gluetun
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: '/gluetun/'
|
||||||
|
name: transmission-with-vpn-gluetun
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
||||||
|
|
||||||
|
- name: transmission
|
||||||
|
# https://hub.docker.com/r/linuxserver/transmission
|
||||||
|
image: ghcr.io/linuxserver/transmission:4.0.6 # {"$imagepolicy": "plex-and-tools:transmission"}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
requests:
|
||||||
|
memory: 1Gi
|
||||||
|
cpu: 10m
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 9091
|
||||||
|
protocol: TCP
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: plex-and-tools
|
||||||
|
volumeMounts:
|
||||||
|
- name: transmission-with-vpn-transmission
|
||||||
|
mountPath: '/config/'
|
||||||
|
- name: plex-media
|
||||||
|
mountPath: /mnt/plex-media/
|
||||||
|
volumes:
|
||||||
|
- name: transmission-with-vpn-gluetun
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: transmission-with-vpn-gluetun
|
||||||
|
|
||||||
|
- name: transmission-with-vpn-transmission
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: transmission-with-vpn-transmission
|
||||||
|
|
||||||
|
# nfs
|
||||||
|
- name: plex-media
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: plex-media
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn-gluetun
|
||||||
|
namespace: plex-and-tools
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
velero.io/exclude-from-backup: 'true' # because this is nfs storage
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: k8s-nfs-ssd
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Mi
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn-transmission
|
||||||
|
namespace: plex-and-tools
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
velero.io/exclude-from-backup: 'true' # because this is nfs storage
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: k8s-nfs-ssd
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: transmission-with-vpn
|
||||||
|
namespace: plex-and-tools
|
||||||
|
labels:
|
||||||
|
app: transmission-with-vpn
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
selector:
|
||||||
|
app: transmission-with-vpn
|
||||||
Reference in New Issue
Block a user