From eb9f477aca60b722d99c393baa2346b9b004e45e Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 4 Aug 2025 13:47:31 -0400 Subject: [PATCH] added transmission --- charts/compose-app/Chart.yaml | 5 +- charts/transmission/Chart.yaml | 6 ++ charts/transmission/templates/deploy.yaml | 74 +++++++++++++++++++++++ charts/transmission/values.yaml | 23 +++++++ 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 charts/transmission/Chart.yaml create mode 100644 charts/transmission/templates/deploy.yaml create mode 100644 charts/transmission/values.yaml diff --git a/charts/compose-app/Chart.yaml b/charts/compose-app/Chart.yaml index eee6df3..763c837 100644 --- a/charts/compose-app/Chart.yaml +++ b/charts/compose-app/Chart.yaml @@ -1,6 +1,7 @@ apiVersion: v2 -name: immich -description: An apps service for homelab +name: compose-app +description: | + A simple helm chart that takes a compose-like YAML file format and deploys it to a Kubernetes cluster. type: application version: 0.1.0 dependencies: [] diff --git a/charts/transmission/Chart.yaml b/charts/transmission/Chart.yaml new file mode 100644 index 0000000..384fc56 --- /dev/null +++ b/charts/transmission/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: Transmission +description: A Helm chart for deploying Transmission, a BitTorrent client, to a Kubernetes cluster. +type: application +version: 0.1.0 +dependencies: [] diff --git a/charts/transmission/templates/deploy.yaml b/charts/transmission/templates/deploy.yaml new file mode 100644 index 0000000..72208c7 --- /dev/null +++ b/charts/transmission/templates/deploy.yaml @@ -0,0 +1,74 @@ +{{ $labels := (dict + "app.kubernetes.io/name" .Chart.Name + "app.kubernetes.io/instance" .Release.Name + "app.kubernetes.io/part-of" .Release.Namespace +) }} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + name: {{ .Release.Namespace }} +spec: + replicas: 1 + revisionHistoryLimit: 4 + selector: + matchLabels: + {{ $labels | toYaml | nindent 8 }} + strategy: + type: Recreate + restartPolicy: Always + template: + metadata: + labels: + {{ $labels | toYaml | nindent 16 }} + spec: + containers: + - name: main + env: + {{ $.Values.transmission.env | toYaml | nindent 25 }} + image: "{{ $.Values.transmission.image }}" + imagePullPolicy: Always + resources: + {{ $.Values.transmission.resources | toYaml | nindent 25 }} + initContainers: + - name: vpn + env: + {{ $.Values.gluetun.env | toYaml | nindent 25 }} + image: {{ $.Values.gluetun.image }} + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9091 + protocol: TCP + name: http-tcp + - containerPort: 9091 + protocol: UDP + name: http-udp + - containerPort: 51413 + protocol: TCP + name: torrent-tcp + - containerPort: 51413 + protocol: UDP + name: torrent-udp + resources: + {{ $.Values.gluetun.resources | toYaml | nindent 25 }} + restartPolicy: Always + securityContext: + capabilities: + add: + - NET_ADMIN + - name: ping + image: {{ $.Values.busybox.image }} + imagePullPolicy: IfNotPresent + resources: + {{ $.Values.busybox.resources | toYaml | nindent 25 }} + command: + - sh + - -c + - | + while ! ping -c 1 8.8.8.8; do + echo "Ping failed, retrying in 5" + sleep 5 + done + echo "ping succesfull, exiting" diff --git a/charts/transmission/values.yaml b/charts/transmission/values.yaml new file mode 100644 index 0000000..1149461 --- /dev/null +++ b/charts/transmission/values.yaml @@ -0,0 +1,23 @@ + +transmission: + image: linuxserver/transmission + env: + - name: PUID + value: "1000" + - name: PGID + value: "100" + - name: TZ + value: Etc/UTC + volumes: [] + resources: {} + +gluetun: + image: qmcgaw/gluetun:v3 + resources: {} + env: [] + envFrom: [] + +busybox: + image: busybox + resources: {} +