adding servarr but needs to de-authorise prowlarr before doing backuo/restore due to prowlarr not accesible as localhost:9696 anymore
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
prowlarr_add_bulk_indexer.sh: |
|
||||
#!/bin/sh
|
||||
|
||||
# install package with apk
|
||||
apk add curl jq
|
||||
# Base URL and API key
|
||||
BASE_URL="https://tprowlarr.tryton.geeraert.eu"
|
||||
API_KEY="c5655e0b915d46dbb68d80f40a2daae4"
|
||||
|
||||
APP_PROFILE_ID=1 # Set this to a valid App Profile Id
|
||||
|
||||
# Get the list of all available indexers
|
||||
available_indexers=$(curl -s -X GET "$BASE_URL/api/v1/indexer/schema" \
|
||||
-H "accept: application/json" \
|
||||
-H "X-Api-Key: $API_KEY")
|
||||
|
||||
# Loop through each indexer and add it to Prowlarr
|
||||
echo "$available_indexers" | jq -c '.[]' | while read -r indexer; do
|
||||
indexer_name=$(echo "$indexer" | jq -r '.name')
|
||||
indexer_settings=$(echo "$indexer" | jq -c '.')
|
||||
|
||||
# Add the AppProfileId to the indexer settings
|
||||
indexer_settings=$(echo "$indexer_settings" | jq --argjson appProfileId "$APP_PROFILE_ID" '. + {AppProfileId: $appProfileId}')
|
||||
|
||||
echo "Adding indexer: $indexer_name"
|
||||
|
||||
curl -s -X POST "$BASE_URL/api/v1/indexer" \
|
||||
-H "accept: application/json" \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$indexer_settings"
|
||||
|
||||
echo "Indexer $indexer_name added."
|
||||
done
|
||||
return 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/last-applied-configuration: |
|
||||
{"apiVersion":"v1","data":{"prowlarr_add_bulk_indexer.sh":"#!/bin/bash\n\n# Base URL and API key\nBASE_URL=\"https://prowlarr.tryton.geeraert.eu\"\nAPI_KEY=\"0cb77d794ab74f158daaae044ab850ee\"\n\nAPP_PROFILE_ID=1 # Set this to a valid App Profile Id\n\n# Get the list of all available indexers\navailable_indexers=$(curl -s -X GET \"$BASE_URL/api/v1/indexer/schema\" \\\n -H \"accept: application/json\" \\\n -H \"X-Api-Key: $API_KEY\")\n\n# Loop through each indexer and add it to Prowlarr\necho \"$available_indexers\" | jq -c '.[]' | while read -r indexer; do\n indexer_name=$(echo \"$indexer\" | jq -r '.name')\n indexer_settings=$(echo \"$indexer\" | jq -c '.')\n\n # Add the AppProfileId to the indexer settings\n indexer_settings=$(echo \"$indexer_settings\" | jq --argjson appProfileId \"$APP_PROFILE_ID\" '. + {AppProfileId: $appProfileId}')\n\n echo \"Adding indexer: $indexer_name\"\n\n curl -s -X POST \"$BASE_URL/api/v1/indexer\" \\\n -H \"accept: application/json\" \\\n -H \"X-Api-Key: $API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d \"$indexer_settings\"\n\n echo \"Indexer $indexer_name added.\"\ndone\n"},"kind":"ConfigMap","metadata":{"annotations":{},"creationTimestamp":null,"name":"prowlarr-add-bulk-indexer","namespace":"servarr"}}
|
||||
creationTimestamp: "2025-02-24T14:53:38Z"
|
||||
name: prowlarr-add-bulk-indexer
|
||||
namespace: tservarr
|
||||
resourceVersion: "101531049"
|
||||
uid: daa8c869-779c-49f2-a2ca-bad2d6d77035
|
||||
@@ -0,0 +1,28 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: prowlarr-bulk-add-indexers
|
||||
namespace: tservarr
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: prowlarr-bulk-add-indexers
|
||||
image: alpine
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: scripts
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /config/prowlarr_add_bulk_indexer.sh
|
||||
# command: ["chmod","+x","/config/prowlarr_add_bulk_indexer.sh",";","./config/prowlarr_add_bulk_indexer.sh"]
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 365
|
||||
name: prowlarr-add-bulk-indexer
|
||||
name: scripts
|
||||
backoffLimit: 4
|
||||
|
||||
+111
-2
@@ -785,7 +785,7 @@ kubernetes = {
|
||||
}
|
||||
|
||||
gluetun = {
|
||||
enabled = false
|
||||
#enabled = false
|
||||
namespace = "tservarr"
|
||||
dns_nameservers = "10.2.0.1"
|
||||
replicas = 01
|
||||
@@ -888,7 +888,7 @@ kubernetes = {
|
||||
}
|
||||
|
||||
prowlarr = {
|
||||
enabled = false
|
||||
#enabled = false
|
||||
image = "linuxserver/prowlarr:latest"
|
||||
connected_namespace = "tservarr"
|
||||
# dns_nameservers = "10.2.0.1"
|
||||
@@ -928,5 +928,114 @@ kubernetes = {
|
||||
}
|
||||
|
||||
}
|
||||
radarr = {
|
||||
#enabled = false
|
||||
image = "lscr.io/linuxserver/radarr:latest"
|
||||
connected_namespace = "tservarr"
|
||||
service_port = 7878
|
||||
|
||||
environment = {
|
||||
PUID = {
|
||||
value = "1000"
|
||||
}
|
||||
PGID = {
|
||||
value = "1000"
|
||||
}
|
||||
TZ = {
|
||||
value = "Etc/UTC"
|
||||
}
|
||||
}
|
||||
# requirements = {
|
||||
# limits-cpu = "1000m"
|
||||
# limits-memory = "1Gi"
|
||||
# requests-cpu = "500m"
|
||||
# requests-memory = "400Mi"
|
||||
# }
|
||||
pvc = {
|
||||
radarr-config = {
|
||||
name = "radarr-config"
|
||||
pvc_size = "10Mi"
|
||||
pvc = true
|
||||
mount_path = "/config"
|
||||
}
|
||||
servarr-data = {
|
||||
name = "servarr-data"
|
||||
pvc_size = "10Mi"
|
||||
pvc = false
|
||||
host_path = "/data"
|
||||
mount_path = "/disk"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
sonarr = {
|
||||
# enabled = false
|
||||
image = "lscr.io/linuxserver/sonarr:latest"
|
||||
connected_namespace = "tservarr"
|
||||
service_port = 8989
|
||||
|
||||
environment = {
|
||||
PUID = {
|
||||
value = "1000"
|
||||
}
|
||||
PGID = {
|
||||
value = "1000"
|
||||
}
|
||||
TZ = {
|
||||
value = "Etc/UTC"
|
||||
}
|
||||
}
|
||||
# requirements = {
|
||||
# limits-cpu = "1000m"
|
||||
# limits-memory = "1Gi"
|
||||
# requests-cpu = "500m"
|
||||
# requests-memory = "400Mi"
|
||||
# }
|
||||
pvc = {
|
||||
sonarr-config = {
|
||||
name = "sonarr-config"
|
||||
pvc_size = "10Mi"
|
||||
pvc = true
|
||||
mount_path = "/config"
|
||||
}
|
||||
servarr-data = {
|
||||
name = "servarr-data"
|
||||
pvc_size = "10Mi"
|
||||
pvc = false
|
||||
host_path = "/data"
|
||||
mount_path = "/disk"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
flaresolverr = {
|
||||
#enabled = false
|
||||
image = "ghcr.io/flaresolverr/flaresolverr:latest"
|
||||
connected_namespace = "tservarr"
|
||||
service_port = 8191
|
||||
|
||||
environment = {
|
||||
PUID = {
|
||||
value = "1000"
|
||||
}
|
||||
PGID = {
|
||||
value = "1000"
|
||||
}
|
||||
TZ = {
|
||||
value = "Etc/UTC"
|
||||
}
|
||||
}
|
||||
# requirements = {
|
||||
# limits-cpu = "1000m"
|
||||
# limits-memory = "1Gi"
|
||||
# requests-cpu = "500m"
|
||||
# requests-memory = "400Mi"
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user