Skip to content

Instantly share code, notes, and snippets.

@nullset2
Last active April 4, 2025 23:52
Show Gist options
  • Save nullset2/5750a4263a9c1ef6391aa4aec0fba2ed to your computer and use it in GitHub Desktop.
Save nullset2/5750a4263a9c1ef6391aa4aec0fba2ed to your computer and use it in GitHub Desktop.
Setup

To install transmission:

helm install transmission \
  --set env.LOCAL_NETWORK="10.0.0.0\/8\,172.16.0.0\/12\,192.168.1.0\/24" \
  --set image.tag=latest \
  --set env.OPENVPN_CONFIG=ca_vancouver \
  --set env.OPENVPN_OPTS="--inactive 3600 --ping 10 --ping-exit 60 --pull-filter ignore ping" \
  --set env.OPENVPN_PROVIDER=PIA \
  --set env.PIA_OPENVPN_CONFIG_BUNDLE=openvpn \
  --set env.OPENVPN_USERNAME=... \
  --set env.TRANSMISSION_DOWNLOAD_DIR=\/media \
  --set env.TRANSMISSION_INCOMPLETE_DIR=\/media\/incomplete \
  --set secretEnv.OPENVPN_PASSWORD=...\
  --set persistence.existingClaim="nfs-pvc" \
  --kube-context=pine \
  -f values.yaml \
  utkuozdemir/transmission-openvpn

My values.yaml for the previous command:

extraVolumeMounts:
  - mountPath: /config
    name: config
  - mountPath: /media
    name: media

extraVolumes:
  - name: config
    persistentVolumeClaim:
      claimName: pine-transmission-config-pvc
  - name: media
    persistentVolumeClaim:
      claimName: nfs-pvc

persistence:
  accessModes:
    - ReadWriteMany

env:
  CREATE_TUN_DEVICE: "false"

My transmission-related PV/PVC:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pine-transmission-config-pv
  labels:
    type: local
spec:
  storageClassName: local-path
  capacity:
    storage: 100Mi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/config"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pine-transmission-config-pvc
spec:
  storageClassName: local-path
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100M

To deploy plex:

helm install plex k8s-home-lab/plex \
	--set image.tag=rolling \
	--set env.TZ="America/Los Angeles" \
	--set ingress.main.enabled=true \
	--set hostNetwork=true \
	--set persistence.config.enabled=true \
	--set persistence.config.existingClaim=plex-config \
	--set persistence.media.enabled=true \
	--set persistence.media.existingClaim=nfs-pvc \
	--kube-context=pine

Make sure to create plex-config as a PV/PVC first, or alternatively the chart can set it up for you if you pass, instead of existingClaim:

  --set persistence.config.enabled=true \
  --set persistence.config.storageClass="local-path" \

For the NFS PV and PVC, I've been running into very weird stability issues with the NAS: it will work for about 2 weeks uninterruptedly, and then the NFS server will crash randomly. I have changed the NFS mapping in the exports file to use async instead of sync and I have enabled a few mountoptions on the PV on the client side; so far so good. Give it a go if you also experience issues:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs-pv
spec:
  storageClassName: nfs-client
  capacity:
    storage: 4Ti
  accessModes:
    - ReadWriteMany
  nfs:
    server: 192.168.1.44
    path: /data
  mountOptions:
  - intr
  - hard
  - timeo=14
  - rsize=8192
  - wsize=8192
  - noacl
  - nocto
  - noatime
  - nodiratime
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-pvc
spec:
  accessModes:
    - ReadWriteMany
  volumeName: nfs-pv
  storageClassName: nfs-client
  resources:
    requests:
      storage: 4Ti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment