diff --git a/charts/stable/qbittorrent/Chart.yaml b/charts/stable/qbittorrent/Chart.yaml index ecb727a03b4..ef79df44738 100644 --- a/charts/stable/qbittorrent/Chart.yaml +++ b/charts/stable/qbittorrent/Chart.yaml @@ -21,7 +21,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/qbittorrent - https://github.com/qbittorrent/qBittorrent type: application -version: 16.0.12 +version: 16.1.0 annotations: truecharts.org/category: media truecharts.org/SCALE-support: "true" diff --git a/charts/stable/qbittorrent/questions.yaml b/charts/stable/qbittorrent/questions.yaml index f2685bd0a72..dc8cea846e5 100644 --- a/charts/stable/qbittorrent/questions.yaml +++ b/charts/stable/qbittorrent/questions.yaml @@ -16,6 +16,34 @@ questions: # Include{containerAdvanced} # Include{containerConfig} + - variable: qbitportforward + group: App Configuration + label: Gluetun Port Forwarding + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: Enable Gluetun Port Forwarding Automation + description: Enable and configure Gluetun Port Forwarding Automation. + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: QBT_USERNAME + label: qBittorrent Username + description: qBittorrent WebUI Username + schema: + type: string + default: "admin" + - variable: QBT_PASSWORD + label: qBittorrent Password + description: qBittorrent WebUI Password + schema: + type: string + default: "adminadmin" + # Include{podOptions} # Include{serviceRoot} # Include{serviceMain} diff --git a/charts/stable/qbittorrent/templates/common.yaml b/charts/stable/qbittorrent/templates/common.yaml index 6f4a8126984..72b5bf40828 100644 --- a/charts/stable/qbittorrent/templates/common.yaml +++ b/charts/stable/qbittorrent/templates/common.yaml @@ -1,13 +1,10 @@ {{/* Make sure all variables are set properly */}} {{- include "tc.v1.common.loader.init" . }} -{{/* Set it to the same port as "torrent" service/port */}} -{{- $_ := set $.Values.service.torrent.ports.torrentudp "port" .Values.service.torrent.ports.torrent.port -}} - -{{/* Render configmap for vaultwarden */}} -{{- $configmap := include "qbittorrent.configmap" . | fromYaml -}} -{{- if $configmap -}} -{{- $_ := set .Values.configmap "qbittorrent-scripts" $configmap -}} +{{/* Disable [qbitportforward] if requested */}} +{{- if not .Values.qbitportforward.enabled -}} + {{- $_ := set .Values.workload.qbitportforward "enabled" false -}} + {{- $_ := set .Values.service.gluetun "enabled" false -}} {{- end -}} {{/* Render the templates */}} diff --git a/charts/stable/qbittorrent/values.yaml b/charts/stable/qbittorrent/values.yaml index 3d1eb5b6973..749f8d0122e 100644 --- a/charts/stable/qbittorrent/values.yaml +++ b/charts/stable/qbittorrent/values.yaml @@ -2,6 +2,14 @@ image: repository: ghcr.io/onedr0p/qbittorrent pullPolicy: IfNotPresent tag: 4.6.0@sha256:cb6259df3be61a5108bc4f85b09a523fc4b250589ca9b315ef927cbdf779afb6 +qbitportforwardImage: + repository: mjmeli/qbittorrent-port-forward-gluetun-server + pullPolicy: IfNotPresent + tag: latest@sha256:67d0d21ed792cf80716d4211e7162b6d375af5c12f3cf096c9032ad705dddaa8 +qbitportforward: + enabled: false + QBT_USERNAME: "admin" + QBT_PASSWORD: "adminadmin" service: main: ports: @@ -19,20 +27,43 @@ service: enabled: true port: 6881 protocol: udp + gluetun: + enabled: true + type: ClusterIP + ports: + gluetun: + enabled: true + port: 8000 + targetPort: 8000 + protocol: http +workload: + qbitportforward: + enabled: true + type: Deployment + strategy: RollingUpdate + replicas: 1 + podSpec: + containers: + qbitportforward: + primary: true + enabled: true + imageSelector: qbitportforwardImage + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + env: + QBT_USERNAME: "{{ .Values.qbitportforward.QBT_USERNAME }}" + QBT_PASSWORD: "{{ .Values.qbitportforward.QBT_PASSWORD }}" + QBT_ADDR: '{{ printf "http://%v:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.main.ports.main.port }}' + GTN_ADDR: '{{ printf "http://%v-gluetun:8000" (include "tc.v1.common.lib.chart.names.fullname" $) }}' persistence: config: enabled: true mountPath: "/config" -additionalVolumes: - - name: qbittorrent-scripts - emptyDir: {} - ## When you want to enable automatic port configuration at startup, adjust this to: - # configMap: - # name: -scripts - # defaultMode: "511" -additionalVolumeMounts: - - mountPath: "/config/custom-cont-init.d" - name: qbittorrent-scripts portal: open: enabled: true