91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
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
|