[transmission] use string config and showoff initContainer (#813)

This commit is contained in:
ᗪєνιη ᗷυнʟ 2021-04-22 12:36:00 -04:00 committed by GitHub
parent 4d2332b8ca
commit 6c5afb5550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 151 additions and 180 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v3.00 appVersion: v3.00
description: Transmission is a cross-platform BitTorrent client description: Transmission is a cross-platform BitTorrent client
name: transmission name: transmission
version: 4.0.0 version: 5.0.0
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- transmission - transmission

View File

@ -1,6 +1,6 @@
# transmission # transmission
![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![AppVersion: v3.00](https://img.shields.io/badge/AppVersion-v3.00-informational?style=flat-square) ![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![AppVersion: v3.00](https://img.shields.io/badge/AppVersion-v3.00-informational?style=flat-square)
Transmission is a cross-platform BitTorrent client Transmission is a cross-platform BitTorrent client
@ -76,6 +76,7 @@ N/A
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| config | string | string | Transmission's settings.json configuration |
| env | object | `{}` | | | env | object | `{}` | |
| image.pullPolicy | string | `"IfNotPresent"` | | | image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/k8s-at-home/transmission"` | | | image.repository | string | `"ghcr.io/k8s-at-home/transmission"` | |
@ -92,93 +93,9 @@ N/A
| persistence.watch.mountPath | string | `"/watch"` | | | persistence.watch.mountPath | string | `"/watch"` | |
| probes.liveness.spec.timeoutSeconds | int | `30` | | | probes.liveness.spec.timeoutSeconds | int | `30` | |
| probes.readiness.spec.timeoutSeconds | int | `30` | | | probes.readiness.spec.timeoutSeconds | int | `30` | |
| service.additionalServices[0].annotations | object | `{}` | |
| service.additionalServices[0].enabled | bool | `true` | |
| service.additionalServices[0].nameSuffix | string | `"utptcp"` | |
| service.additionalServices[0].port.name | string | `"utptcp"` | |
| service.additionalServices[0].port.port | int | `51413` | |
| service.additionalServices[0].port.protocol | string | `"TCP"` | |
| service.additionalServices[0].port.targetport | int | `51413` | |
| service.additionalServices[0].type | string | `"ClusterIP"` | |
| service.additionalServices[1].annotations | object | `{}` | |
| service.additionalServices[1].enabled | bool | `true` | |
| service.additionalServices[1].nameSuffix | string | `"utpudp"` | |
| service.additionalServices[1].port.name | string | `"utpudp"` | |
| service.additionalServices[1].port.port | int | `51413` | |
| service.additionalServices[1].port.protocol | string | `"UDP"` | |
| service.additionalServices[1].port.targetport | int | `51413` | |
| service.additionalServices[1].type | string | `"ClusterIP"` | |
| service.port.name | string | `"http"` | | | service.port.name | string | `"http"` | |
| service.port.port | int | `9091` | | | service.port.port | int | `9091` | |
| strategy.type | string | `"Recreate"` | | | strategy.type | string | `"Recreate"` | |
| transmissionConfig.alt-speed-down | int | `50` | |
| transmissionConfig.alt-speed-enabled | bool | `false` | |
| transmissionConfig.alt-speed-time-begin | int | `540` | |
| transmissionConfig.alt-speed-time-day | int | `127` | |
| transmissionConfig.alt-speed-time-enabled | bool | `false` | |
| transmissionConfig.alt-speed-time-end | int | `1020` | |
| transmissionConfig.alt-speed-up | int | `50` | |
| transmissionConfig.bind-address-ipv4 | string | `"0.0.0.0"` | |
| transmissionConfig.bind-address-ipv6 | string | `"::\""` | |
| transmissionConfig.blocklist-enabled | bool | `true` | |
| transmissionConfig.blocklist-url | string | `"http://john.bitsurge.net/public/biglist.p2p.gz"` | |
| transmissionConfig.cache-size-mb | int | `4` | |
| transmissionConfig.dht-enabled | bool | `true` | |
| transmissionConfig.download-dir | string | `"/downloads/complete"` | |
| transmissionConfig.download-queue-enabled | bool | `true` | |
| transmissionConfig.download-queue-size | int | `5` | |
| transmissionConfig.encryption | int | `1` | |
| transmissionConfig.idle-seeding-limit | int | `30` | |
| transmissionConfig.idle-seeding-limit-enabled | bool | `false` | |
| transmissionConfig.incomplete-dir | string | `"/downloads/incomplete"` | |
| transmissionConfig.incomplete-dir-enabled | bool | `true` | |
| transmissionConfig.lpd-enabled | bool | `false` | |
| transmissionConfig.message-level | int | `2` | |
| transmissionConfig.peer-congestion-algorithm | string | `""` | |
| transmissionConfig.peer-id-ttl-hours | int | `6` | |
| transmissionConfig.peer-limit-global | int | `200` | |
| transmissionConfig.peer-limit-per-torrent | int | `50` | |
| transmissionConfig.peer-port | int | `51413` | |
| transmissionConfig.peer-port-random-high | int | `65535` | |
| transmissionConfig.peer-port-random-low | int | `49152` | |
| transmissionConfig.peer-port-random-on-start | bool | `false` | |
| transmissionConfig.peer-socket-tos | string | `"default"` | |
| transmissionConfig.pex-enabled | bool | `true` | |
| transmissionConfig.port-forwarding-enabled | bool | `false` | |
| transmissionConfig.preallocation | int | `1` | |
| transmissionConfig.prefetch-enabled | bool | `true` | |
| transmissionConfig.queue-stalled-enabled | bool | `true` | |
| transmissionConfig.queue-stalled-minutes | int | `30` | |
| transmissionConfig.ratio-limit | int | `2` | |
| transmissionConfig.ratio-limit-enabled | bool | `false` | |
| transmissionConfig.rename-partial-files | bool | `true` | |
| transmissionConfig.rpc-authentication-required | bool | `false` | |
| transmissionConfig.rpc-bind-address | string | `"0.0.0.0"` | |
| transmissionConfig.rpc-enabled | bool | `true` | |
| transmissionConfig.rpc-host-whitelist | string | `""` | |
| transmissionConfig.rpc-host-whitelist-enabled | bool | `false` | |
| transmissionConfig.rpc-password | string | `"CHANGEME"` | |
| transmissionConfig.rpc-port | int | `9091` | |
| transmissionConfig.rpc-url | string | `"/transmission/"` | |
| transmissionConfig.rpc-username | string | `""` | |
| transmissionConfig.rpc-whitelist | string | `""` | |
| transmissionConfig.rpc-whitelist-enabled | bool | `false` | |
| transmissionConfig.scrape-paused-torrents-enabled | bool | `true` | |
| transmissionConfig.script-torrent-done-enabled | bool | `false` | |
| transmissionConfig.script-torrent-done-filename | string | `""` | |
| transmissionConfig.seed-queue-enabled | bool | `false` | |
| transmissionConfig.seed-queue-size | int | `10` | |
| transmissionConfig.speed-limit-down | int | `100` | |
| transmissionConfig.speed-limit-down-enabled | bool | `false` | |
| transmissionConfig.speed-limit-up | int | `100` | |
| transmissionConfig.speed-limit-up-enabled | bool | `false` | |
| transmissionConfig.start-added-torrents | bool | `true` | |
| transmissionConfig.trash-original-torrent-files | bool | `false` | |
| transmissionConfig.umask | int | `2` | |
| transmissionConfig.upload-slots-per-torrent | int | `14` | |
| transmissionConfig.utp-enabled | bool | `true` | |
| transmissionConfig.watch-dir | string | `"/watch"` | |
| transmissionConfig.watch-dir-enabled | bool | `false` | |
## Changelog ## Changelog
@ -186,6 +103,16 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [5.0.0]
#### Added
- Example initContainer to showcase adding a custom web ui
#### Changed
- **Breaking**: `transmissionConfig` became `config` and is now a string not a object
### [4.0.0] ### [4.0.0]
#### Changed #### Changed
@ -204,6 +131,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Initial commit - Initial commit
[5.0.0]: #5.0.0
[4.0.0]: #4.0.0 [4.0.0]: #4.0.0
[1.0.0]: #1.0.0 [1.0.0]: #1.0.0

View File

@ -9,6 +9,16 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [5.0.0]
#### Added
- Example initContainer to showcase adding a custom web ui
#### Changed
- **Breaking**: `transmissionConfig` became `config` and is now a string not an object
### [4.0.0] ### [4.0.0]
#### Changed #### Changed
@ -27,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Initial commit - Initial commit
[5.0.0]: #5.0.0
[4.0.0]: #4.0.0 [4.0.0]: #4.0.0
[1.0.0]: #1.0.0 [1.0.0]: #1.0.0
{{- end -}} {{- end -}}

View File

@ -0,0 +1,18 @@
initContainers:
- name: custom-webui
image: curlimages/curl:7.76.1
command:
- "/bin/sh"
- "-c"
- "curl -fsSL -o /tmp/flood-for-transmission.tar.gz https://github.com/johman10/flood-for-transmission/releases/download/latest/flood-for-transmission.tar.gz"
- "mkdir -p /config/flood"
- "tar xf /tmp/flood-for-transmission.tar.gz --strip-components 1 -C /config/flood"
volumeMounts:
- name: config
mountPath: /config
persistence:
config:
enabled: true
emptyDir:
enabled: true

View File

@ -6,4 +6,4 @@ metadata:
{{- include "common.labels" . | nindent 4 }} {{- include "common.labels" . | nindent 4 }}
data: data:
settings.json: | settings.json: |
{{- .Values.transmissionConfig | mustToPrettyJson | nindent 4 }} {{- .Values.config | nindent 4 }}

View File

@ -5,6 +5,20 @@
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml # https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
# #
# # Use an initContainer to download a custom web ui
# initContainers:
# - name: custom-webui
# image: curlimages/curl:7.76.1
# command:
# - "/bin/sh"
# - "-c"
# - "curl -fsSL -o /tmp/flood-for-transmission.tar.gz https://github.com/johman10/flood-for-transmission/releases/download/latest/flood-for-transmission.tar.gz"
# - "mkdir -p /config/flood"
# - "tar xf /tmp/flood-for-transmission.tar.gz --strip-components 1 -C /config/flood"
# volumeMounts:
# - name: config
# mountPath: /config
image: image:
repository: ghcr.io/k8s-at-home/transmission repository: ghcr.io/k8s-at-home/transmission
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@ -13,37 +27,33 @@ image:
strategy: strategy:
type: Recreate type: Recreate
# See more environment variables in the transmission documentation
# https://hub.docker.com/r/linuxserver/transmission
env: {} env: {}
# PUID: 1000
# PGID: 1000
# TZ: UTC # TZ: UTC
# TRANSMISSION_WEB_HOME: /config/flood
service: service:
port: port:
port: 9091 port: 9091
name: http name: http
# additionalServices:
additionalServices: # - enabled: true
- enabled: true # nameSuffix: utptcp
nameSuffix: utptcp # type: ClusterIP
type: ClusterIP # annotations: {}
annotations: {} # port:
port: # port: 51413
port: 51413 # name: utptcp
name: utptcp # protocol: TCP
protocol: TCP # targetport: 51413
targetport: 51413 # - enabled: true
- enabled: true # nameSuffix: utpudp
nameSuffix: utpudp # type: ClusterIP
type: ClusterIP # annotations: {}
annotations: {} # port:
port: # port: 51413
port: 51413 # name: utpudp
name: utpudp # protocol: UDP
protocol: UDP # targetport: 51413
targetport: 51413
## transmission runs the gui and io on the same thread - heavy bandwith usage ## transmission runs the gui and io on the same thread - heavy bandwith usage
## may stall the UI and result in restarts. ## may stall the UI and result in restarts.
@ -102,72 +112,76 @@ persistence:
enabled: false enabled: false
mountPath: /watch mountPath: /watch
transmissionConfig: # -- Transmission's settings.json configuration
alt-speed-down: 50 # @default -- string
alt-speed-enabled: false config: |
alt-speed-time-begin: 540 {
alt-speed-time-day: 127 "alt-speed-down": 50,
alt-speed-time-enabled: false "alt-speed-enabled": false,
alt-speed-time-end: 1020 "alt-speed-time-begin": 540,
alt-speed-up: 50 "alt-speed-time-day": 127,
bind-address-ipv4: "0.0.0.0" "alt-speed-time-enabled": false,
bind-address-ipv6: ::" "alt-speed-time-end": 1020,
blocklist-enabled: true "alt-speed-up": 50,
blocklist-url: "http://john.bitsurge.net/public/biglist.p2p.gz" "bind-address-ipv4": "0.0.0.0",
cache-size-mb: 4 "bind-address-ipv6": "::",
dht-enabled: true "blocklist-enabled": true,
download-dir: "/downloads/complete" "blocklist-url": "http://john.bitsurge.net/public/biglist.p2p.gz",
download-queue-enabled: true "cache-size-mb": 4,
download-queue-size: 5 "dht-enabled": true,
encryption: 1 "download-dir": "/downloads/complete",
idle-seeding-limit: 30 "download-queue-enabled": true,
idle-seeding-limit-enabled: false "download-queue-size": 5,
incomplete-dir: "/downloads/incomplete" "encryption": 1,
incomplete-dir-enabled: true "idle-seeding-limit": 30,
lpd-enabled: false "idle-seeding-limit-enabled": false,
message-level: 2 "incomplete-dir": "/downloads/incomplete",
peer-congestion-algorithm: "" "incomplete-dir-enabled": true,
peer-id-ttl-hours: 6 "lpd-enabled": false,
peer-limit-global: 200 "message-level": 2,
peer-limit-per-torrent: 50 "peer-congestion-algorithm": "",
peer-port: 51413 "peer-id-ttl-hours": 6,
peer-port-random-high: 65535 "peer-limit-global": 200,
peer-port-random-low: 49152 "peer-limit-per-torrent": 50,
peer-port-random-on-start: false "peer-port": 51413,
peer-socket-tos: "default" "peer-port-random-high": 65535,
pex-enabled: true "peer-port-random-low": 49152,
port-forwarding-enabled: false "peer-port-random-on-start": false,
preallocation: 1 "peer-socket-tos": "default",
prefetch-enabled: true "pex-enabled": true,
queue-stalled-enabled: true "port-forwarding-enabled": false,
queue-stalled-minutes: 30 "preallocation": 1,
ratio-limit: 2 "prefetch-enabled": true,
ratio-limit-enabled: false "queue-stalled-enabled": true,
rename-partial-files: true "queue-stalled-minutes": 30,
rpc-authentication-required: false "ratio-limit": 2,
rpc-bind-address: "0.0.0.0" "ratio-limit-enabled": false,
rpc-enabled: true "rename-partial-files": true,
rpc-host-whitelist: "" "rpc-authentication-required": false,
rpc-host-whitelist-enabled: false "rpc-bind-address": "0.0.0.0",
rpc-password: "CHANGEME" "rpc-enabled": true,
rpc-port: 9091 "rpc-host-whitelist": "",
rpc-url: "/transmission/" "rpc-host-whitelist-enabled": false,
rpc-username: "" "rpc-password": "CHANGEME",
rpc-whitelist: "" "rpc-port": 9091,
rpc-whitelist-enabled: false "rpc-url": "/transmission/",
scrape-paused-torrents-enabled: true "rpc-username": "",
script-torrent-done-enabled: false "rpc-whitelist": "",
script-torrent-done-filename: "" "rpc-whitelist-enabled": false,
seed-queue-enabled: false "scrape-paused-torrents-enabled": true,
seed-queue-size: 10 "script-torrent-done-enabled": false,
speed-limit-down: 100 "script-torrent-done-filename": "",
speed-limit-down-enabled: false "seed-queue-enabled": false,
speed-limit-up: 100 "seed-queue-size": 10,
speed-limit-up-enabled: false "speed-limit-down": 100,
start-added-torrents: true "speed-limit-down-enabled": false,
trash-original-torrent-files: false "speed-limit-up": 100,
umask: 2 "speed-limit-up-enabled": false,
upload-slots-per-torrent: 14 "start-added-torrents": true,
utp-enabled: true "trash-original-torrent-files": false,
watch-dir: "/watch" "umask": 2,
watch-dir-enabled: false "upload-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/watch",
"watch-dir-enabled": false
}