From 8c882adffe8260cfd433c0904f9c331d19e0764c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Limpinho?= <53994778+TomasLimpinho@users.noreply.github.com> Date: Tue, 11 Nov 2025 19:14:35 +0000 Subject: [PATCH] new qbittorrent image --- .../files/qbittorrent-deployment.yaml | 61 ++++++------------- roles/qbittorrent/files/vpn-secret.yaml | 2 - roles/qbittorrent/tasks/main.yml | 2 +- 3 files changed, 21 insertions(+), 44 deletions(-) diff --git a/roles/qbittorrent/files/qbittorrent-deployment.yaml b/roles/qbittorrent/files/qbittorrent-deployment.yaml index 9947be2..14a463f 100644 --- a/roles/qbittorrent/files/qbittorrent-deployment.yaml +++ b/roles/qbittorrent/files/qbittorrent-deployment.yaml @@ -17,66 +17,45 @@ spec: - name: regcred containers: - name: qbittorrentvpn - image: binhex/arch-qbittorrentvpn:5 + image: j4ym0/pia-qbittorrent:5.1.2-ubuntu securityContext: - privileged: true # necessário para manipular tun devices + capabilities: + add: + - NET_ADMIN ports: - - containerPort: 8080 # WebUI do qBittorrent - - containerPort: 8118 - - containerPort: 9118 - - containerPort: 58946 + - containerPort: 8080 + name: webui + - containerPort: 51413 + name: torrent-tcp + - containerPort: 51413 + name: torrent-udp + protocol: UDP env: - - name: VPN_ENABLED - value: "yes" - - name: VPN_PROV - valueFrom: - secretKeyRef: - name: vpn-secrets - key: vpnprov - - name: VPN_USER + - name: USER valueFrom: secretKeyRef: name: vpn-secrets key: username - - name: VPN_PASS + - name: PASSWORD valueFrom: secretKeyRef: name: vpn-secrets key: password - - name: VPN_CLIENT - value: "openvpn" - - name: ENABLE_STARTUP_SCRIPTS - value: "no" - - name: ENABLE_PRIVOXY - value: "yes" - - name: STRICT_PORT_FORWARD - value: "yes" - - name: USERSPACE_WIREGUARD - value: "no" - - name: ENABLE_SOCKS - value: "no" - - name: DEBUG - value: "false" + - name: REGION + value: "us_new_york" # ou outro servidor PIA - name: WEBUI_PORT value: "8080" - - name: UMASK - value: "000" - - name: PUID + - name: DNS_SERVERS + value: "1.1.1.1,1.0.0.1" + - name: UID value: "1013" - - name: PGID + - name: GID value: "1013" - - name: LAN_NETWORK - valueFrom: - secretKeyRef: - name: vpn-secrets - key: lannetwork - - name: NAME_SERVERS - value: "1.1.1.1,8.8.8.8" volumeMounts: - name: config mountPath: /config - name: downloads - mountPath: /data + mountPath: /downloads volumes: - name: config persistentVolumeClaim: diff --git a/roles/qbittorrent/files/vpn-secret.yaml b/roles/qbittorrent/files/vpn-secret.yaml index 143365e..d826aca 100644 --- a/roles/qbittorrent/files/vpn-secret.yaml +++ b/roles/qbittorrent/files/vpn-secret.yaml @@ -5,7 +5,5 @@ metadata: namespace: stack-arr type: Opaque data: - lannetwork: MTkyLjE2OC4xLjAvMjQ= - vpnprov: cGlh username: dXNlcm5hbWU= password: cGFzc3dvcmQ= \ No newline at end of file diff --git a/roles/qbittorrent/tasks/main.yml b/roles/qbittorrent/tasks/main.yml index ce4f46e..afb60a2 100644 --- a/roles/qbittorrent/tasks/main.yml +++ b/roles/qbittorrent/tasks/main.yml @@ -29,7 +29,7 @@ echo "get item" bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }} loop: - - { id: "iac.ansible.dockersecrets", dest: "/tmp/stack-arr/qbittorrent/kubernetes-files/files/docker-secrets.yaml" } + - { id: "iac.ansible.stackarr.qbittorrent.dockersecrets", dest: "/tmp/stack-arr/qbittorrent/kubernetes-files/files/docker-secrets.yaml" } - { id: "iac.ansible.stackarr.qbittorrent.secret", dest: "/tmp/stack-arr/qbittorrent/kubernetes-files/files/vpn-secret.yaml" } args: executable: /bin/bash