Compare commits
3 Commits
e5c3b8eef9
...
ddea27fab2
| Author | SHA1 | Date | |
|---|---|---|---|
|
ddea27fab2
|
|||
| 4861f22e95 | |||
| 577bad693b |
@@ -8,5 +8,8 @@ dependencies:
|
|||||||
- name: volsync-target
|
- name: volsync-target
|
||||||
repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
version: 0.5.0
|
version: 0.5.0
|
||||||
digest: sha256:ba09cbd5ad5eea8b6b4a4c67aa868f73c981d7b9c7658e00964bfe018cdcb2c6
|
- name: volsync-target
|
||||||
generated: "2025-12-17T11:56:46.294815-06:00"
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
|
version: 0.5.0
|
||||||
|
digest: sha256:2a52a5e028dbfd6c197857815b084e474f0a2c34e2b17fdd718386fd4a949287
|
||||||
|
generated: "2025-12-17T12:42:06.415903-06:00"
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ dependencies:
|
|||||||
alias: qbittorrent
|
alias: qbittorrent
|
||||||
repository: https://bjw-s-labs.github.io/helm-charts/
|
repository: https://bjw-s-labs.github.io/helm-charts/
|
||||||
version: 4.5.0
|
version: 4.5.0
|
||||||
# - name: volsync-target
|
- name: volsync-target
|
||||||
# alias: volsync-target-config
|
alias: volsync-target-config
|
||||||
# version: 0.5.0
|
version: 0.5.0
|
||||||
# repository: oci://harbor.alexlebens.net/helm-charts
|
repository: oci://harbor.alexlebens.net/helm-charts
|
||||||
- name: volsync-target
|
- name: volsync-target
|
||||||
alias: volsync-target-qbit-manage-config
|
alias: volsync-target-qbit-manage-config
|
||||||
version: 0.5.0
|
version: 0.5.0
|
||||||
|
|||||||
@@ -14,12 +14,86 @@ data:
|
|||||||
echo "curl could not be found, installing";
|
echo "curl could not be found, installing";
|
||||||
apk add curl;
|
apk add curl;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
if ! command -v jq 2>&1 >/dev/null
|
||||||
|
then
|
||||||
|
echo "jq could not be found, installing";
|
||||||
|
apk add jq;
|
||||||
|
fi;
|
||||||
|
|
||||||
|
API_ENDPOINT="http://localhost:8080/api/v2";
|
||||||
|
|
||||||
|
# echo " ";
|
||||||
|
# echo ">> Authentication ...";
|
||||||
|
# curl -i --silent --header 'Referer: http://localhost:8080' --output response_body_auth.json --data 'username=admin&password=adminadmin' "${API_ENDPOINT}/auth/login" -c cookie;
|
||||||
|
|
||||||
|
echo " ";
|
||||||
|
echo ">> Test access ...";
|
||||||
|
HTTP_STATUS=$(curl -i -X GET --silent --write-out '%{http_code}' --output response_body_test.json -b cookie -c cookie "${API_ENDPOINT}/app/version");
|
||||||
|
echo ">> HTTP Status Code: $HTTP_STATUS"
|
||||||
|
|
||||||
|
VERSION=$(tail -n 1 ./test/response_body_test.json)
|
||||||
|
|
||||||
|
if [ "$HTTP_STATUS" == "200" ]; then
|
||||||
|
echo ">> Access confirmed, qBittorrent version: ${VERSION}"
|
||||||
|
HTTP_STATUS=""
|
||||||
|
else
|
||||||
|
echo ">> ERROR: HTTP status code: $HTTP_STATUS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PAYLOAD=$( jq -n \
|
||||||
|
--arg random_port "true" \
|
||||||
|
'{random_port: $random_port' );
|
||||||
|
|
||||||
|
echo " ";
|
||||||
echo ">> Setting port to random ...";
|
echo ">> Setting port to random ...";
|
||||||
curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"random_port\": \"true\"}" "http://localhost:8080/api/v2/app/setPreferences";
|
HTTP_STATUS=$(curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_random.json --data "$PAYLOAD" "${API_ENDPOINT}/app/setPreferences");
|
||||||
|
|
||||||
|
if [ "$HTTP_STATUS" == "200" ]; then
|
||||||
|
echo ">> Random port set"
|
||||||
|
HTTP_STATUS=""
|
||||||
|
else
|
||||||
|
echo ">> ERROR: HTTP status code: $HTTP_STATUS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " ";
|
||||||
echo ">> Sleeping for changes to take effect";
|
echo ">> Sleeping for changes to take effect";
|
||||||
sleep 10;
|
sleep 5;
|
||||||
echo ">> Updating port with $1 ...";
|
|
||||||
curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"listen_port\": \"${1}\"}" "http://localhost:8080/api/v2/app/setPreferences";
|
PAYLOAD=$( jq -n \
|
||||||
|
--arg listen_port "${1}" \
|
||||||
|
'{listen_port: $listen_port' );
|
||||||
|
|
||||||
|
echo " ";
|
||||||
|
echo ">> Updating port with ${1} ...";
|
||||||
|
curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_update.json --data "$PAYLOAD" "${API_ENDPOINT}/app/setPreferences";
|
||||||
|
|
||||||
|
if [ "$HTTP_STATUS" == "200" ]; then
|
||||||
|
echo ">> Port set"
|
||||||
|
HTTP_STATUS=""
|
||||||
|
else
|
||||||
|
echo ">> ERROR: HTTP status code: $HTTP_STATUS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " ";
|
||||||
|
echo ">> Sleeping for changes to take effect";
|
||||||
|
sleep 5;
|
||||||
|
|
||||||
|
echo " ";
|
||||||
|
echo ">> Qbittorrent's post is now:";
|
||||||
|
curl -i -X GET --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_check.json "${API_ENDPOINT}/app/preferences";
|
||||||
|
|
||||||
|
LISTEN_PORT=$(cat response_body_check.json | jq -r .listen_port)
|
||||||
|
|
||||||
|
[[ "$HTTP_STATUS" == "200" || "$LISTEN_PORT" == "${1}" ]];
|
||||||
|
echo ">> Port updated successfully!"
|
||||||
|
else
|
||||||
|
echo ">> ERROR: HTTP status code: $HTTP_STATUS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|||||||
@@ -1,24 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
|
||||||
name: qbittorrent-config
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: qbittorrent-config
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
|
||||||
spec:
|
|
||||||
volumeName: qbittorrent-config
|
|
||||||
storageClassName: nfs-client
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteMany
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
metadata:
|
||||||
name: qbittorrent-nfs-storage
|
name: qbittorrent-nfs-storage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
|
|||||||
@@ -1,30 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
|
||||||
name: qbittorrent-config
|
|
||||||
namespace: {{ .Release.Namespace }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: qbittorrent-config
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
|
||||||
spec:
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
storageClassName: nfs-client
|
|
||||||
capacity:
|
|
||||||
storage: 1Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteMany
|
|
||||||
nfs:
|
|
||||||
path: /volume2/Storage/Torrent/QBITTORRENT
|
|
||||||
server: synologybond.alexlebens.net
|
|
||||||
mountOptions:
|
|
||||||
- vers=4
|
|
||||||
- minorversion=1
|
|
||||||
- noac
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
metadata:
|
||||||
name: qbittorrent-nfs-storage
|
name: qbittorrent-nfs-storage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
|
|||||||
@@ -292,18 +292,6 @@ qbittorrent:
|
|||||||
qbit-manage:
|
qbit-manage:
|
||||||
- path: /qbittorrent/qBittorrent
|
- path: /qbittorrent/qBittorrent
|
||||||
readOnly: false
|
readOnly: false
|
||||||
config:
|
|
||||||
type: persistentVolumeClaim
|
|
||||||
existingClaim: qbittorrent-config
|
|
||||||
advancedMounts:
|
|
||||||
main:
|
|
||||||
qbittorrent:
|
|
||||||
- path: /config-old
|
|
||||||
readOnly: false
|
|
||||||
# qbit-manage:
|
|
||||||
# qbit-manage:
|
|
||||||
# - path: /qbittorrent
|
|
||||||
# readOnly: false
|
|
||||||
qbit-manage-config-data:
|
qbit-manage-config-data:
|
||||||
forceRename: qbittorrent-qbit-manage-config-data
|
forceRename: qbittorrent-qbit-manage-config-data
|
||||||
storageClass: ceph-block
|
storageClass: ceph-block
|
||||||
|
|||||||
Reference in New Issue
Block a user