diff --git a/charts/stable/qbittorrent/Chart.yaml b/charts/stable/qbittorrent/Chart.yaml index 3cce4e1c0c6..686388ebdd4 100644 --- a/charts/stable/qbittorrent/Chart.yaml +++ b/charts/stable/qbittorrent/Chart.yaml @@ -35,4 +35,4 @@ sources: - https://ghcr.io/onedr0p/qbittorrent - https://hub.docker.com/r/mjmeli/qbittorrent-port-forward-gluetun-server type: application -version: 19.5.2 +version: 19.5.3 diff --git a/charts/stable/qbittorrent/templates/_configmap.tpl b/charts/stable/qbittorrent/templates/_configmap.tpl deleted file mode 100644 index c1981bfe444..00000000000 --- a/charts/stable/qbittorrent/templates/_configmap.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* Define the configmap */}} -{{- define "qbittorrent.configmap" -}} - -data: - {{- $bittorrentPort := "" -}} - {{- $bittorrentPort = .Values.service.torrent.ports.torrent.port -}} - {{- if $bittorrentPort }} - 31-update-port: |- - #!/bin/bash - QBITTORRENT_CONFIGFILE="/config/qBittorrent/qBittorrent.conf" - INCOMING_PORT={{- $bittorrentPort }} - - incoming_port_exist=$(cat ${QBITTORRENT_CONFIGFILE} | grep -m 1 'Connection\\PortRangeMin='${INCOMING_PORT}) - if [[ -z "${incoming_port_exist}" ]]; then - incoming_exist=$(cat ${QBITTORRENT_CONFIGFILE} | grep -m 1 'Connection\\PortRangeMin') - if [[ ! -z "${incoming_exist}" ]]; then - # Get line number of Incoming - LINE_NUM=$(grep -Fn -m 1 'Connection\PortRangeMin' ${QBITTORRENT_CONFIGFILE} | cut -d: -f 1) - sed -i "${LINE_NUM}s@.*@Connection\\\PortRangeMin=${INCOMING_PORT}@" ${QBITTORRENT_CONFIGFILE} - else - echo "Connection\\PortRangeMin=${INCOMING_PORT}" >> ${QBITTORRENT_CONFIGFILE} - fi - fi - {{- end }} -{{- end -}} diff --git a/charts/stable/qbittorrent/values.yaml b/charts/stable/qbittorrent/values.yaml index 78cf5138ef3..902dae51b1e 100644 --- a/charts/stable/qbittorrent/values.yaml +++ b/charts/stable/qbittorrent/values.yaml @@ -6,6 +6,10 @@ qbitportforwardImage: repository: mjmeli/qbittorrent-port-forward-gluetun-server pullPolicy: IfNotPresent tag: latest@sha256:67d0d21ed792cf80716d4211e7162b6d375af5c12f3cf096c9032ad705dddaa8 + +securityContext: + container: + readOnlyRootFilesystem: false qbitportforward: enabled: false QBT_USERNAME: "admin" @@ -15,7 +19,6 @@ service: ports: main: port: 10095 - targetPort: 8080 torrent: enabled: true ports: @@ -37,6 +40,20 @@ service: targetPort: 8000 protocol: http workload: + main: + podSpec: + containers: + main: + env: + # set the default port + QBITTORRENT__PORT: "{{ .Values.service.main.ports.main.port }}" + # stops users from bricking their chart from setting the ip to a random ip when its a container. + QBT_Preferences__WebUI__Address: "0.0.0.0" + # set port from gui. + QBT_BitTorrent__Session__Port: "{{ .Values.service.torrent.ports.torrent.port }}" + # legacy ini key + # key deprecated https://github.com/qbittorrent/qBittorrent/issues/8324 + QBT_Preferences__Connection__PortRangeMin: "{{ .Values.service.torrent.ports.torrent.port }}" qbitportforward: enabled: true type: CronJob @@ -68,6 +85,3 @@ persistence: portal: open: enabled: true -securityContext: - container: - readOnlyRootFilesystem: false