Files
bart c0d13fd23a
Sync HTPC Manifests to GitOps / Sync Manifests to GitOps Repo (push) Successful in 4s
fix(jackett): copy config into /config/Jackett expected by linuxserver image
2026-10-30 10:11:22 +01:00

105 lines
3.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: jackett
namespace: htpc
labels:
app.kubernetes.io/name: jackett
app.kubernetes.io/part-of: htpc
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: jackett
template:
metadata:
labels:
app: jackett
app.kubernetes.io/name: jackett
app.kubernetes.io/part-of: htpc
spec:
nodeSelector:
kubernetes.io/hostname: vmserver
initContainers:
- name: migrate-config
image: lscr.io/linuxserver/jackett:latest
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- -c
- |
mkdir -p /config/Jackett
if [ ! -f /config/Jackett/ServerConfig.json ] || [ -f /config/ServerConfig.json ]; then
echo "Syncing Jackett config and indexers from host..."
[ -d /host-config/Indexers ] && cp -a /host-config/Indexers /config/Jackett/
[ -d /host-config/DataProtection ] && cp -a /host-config/DataProtection /config/Jackett/
[ -f /host-config/ServerConfig.json ] && cp -a /host-config/ServerConfig.json /config/Jackett/
# Remove misplaced root files if present
rm -rf /config/Indexers /config/ServerConfig.json /config/DataProtection /config/log.txt* /config/updater.txt*
fi
chown -R 33:33 /config
volumeMounts:
- name: config
mountPath: /config
- name: host-config
mountPath: /host-config
readOnly: true
containers:
- name: jackett
image: lscr.io/linuxserver/jackett:latest
imagePullPolicy: IfNotPresent
env:
- name: PUID
value: "33"
- name: PGID
value: "33"
- name: TZ
value: "Europe/Amsterdam"
- name: AUTO_UPDATE
value: "false"
ports:
- name: http
containerPort: 9117
hostPort: 9117
protocol: TCP
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi
volumeMounts:
- name: config
mountPath: /config
- name: datadisk
mountPath: /datadisk
livenessProbe:
httpGet:
path: /jackett/health
port: 9117
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /jackett/health
port: 9117
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
volumes:
- name: config
persistentVolumeClaim:
claimName: jackett-config
- name: host-config
hostPath:
path: /home/bart/.config/Jackett
type: DirectoryOrCreate
- name: datadisk
hostPath:
path: /datadisk
type: Directory