Allow cross-node access to qBittorrent

This commit is contained in:
ahmza committed 2026-11-01 13:26:01 +00:00
1 parent bf2eb577f4
commit 099d71dfa8
1 file changed
+29
+29
View File
@@ -39,6 +39,27 @@ spec:
- name: qbittorrent - name: qbittorrent
image: ghcr.io/hotio/qbittorrent:release image: ghcr.io/hotio/qbittorrent:release
imagePullPolicy: Always imagePullPolicy: Always
# Hotio automatically permits the Pod's directly attached /24 but
# rejects that same subnet in VPN_LAN_NETWORK. Add every *other* /24
# from this cluster's 10.244.0.0/21 Pod range at runtime so traffic
# from ingress-nginx and media apps works regardless of scheduling.
command:
- /bin/sh
- -ec
- |
own_octet="${POD_IP#10.244.}"
own_octet="${own_octet%%.*}"
case "$own_octet" in
0|1|2|3|4|5|6|7) ;;
*) echo "Unexpected Pod IP: $POD_IP" >&2; exit 1 ;;
esac
for octet in 0 1 2 3 4 5 6 7; do
if [ "$octet" != "$own_octet" ]; then
VPN_LAN_NETWORK="${VPN_LAN_NETWORK},10.244.${octet}.0/24"
fi
done
export VPN_LAN_NETWORK
exec /init
securityContext: securityContext:
# Hotio needs this capability to create the WireGuard interface, # Hotio needs this capability to create the WireGuard interface,
# routes, firewall rules, and VPN kill switch inside the Pod. # routes, firewall rules, and VPN kill switch inside the Pod.
@@ -46,6 +67,10 @@ spec:
add: add:
- NET_ADMIN - NET_ADMIN
env: env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: PUID - name: PUID
value: "1000" value: "1000"
- name: PGID - name: PGID
@@ -82,10 +107,14 @@ spec:
- name: http - name: http
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: TCP
# Proton must negotiate a forwarded port before qBittorrent starts
# its Web UI, so avoid expected connection-refused events during that
# normal initialization window.
startupProbe: startupProbe:
httpGet: httpGet:
path: / path: /
port: http port: http
initialDelaySeconds: 30
periodSeconds: 5 periodSeconds: 5
timeoutSeconds: 3 timeoutSeconds: 3
failureThreshold: 36 failureThreshold: 36