diff --git a/apps/transmission/README.md b/apps/transmission/README.md new file mode 100644 index 0000000..317e121 --- /dev/null +++ b/apps/transmission/README.md @@ -0,0 +1,22 @@ +# Transmission on arschrock + +Argo owns the Transmission chart selected in `bootstrap/transmission.yaml`. +The chart runs the public LinuxServer image as `feedc0de` (1000:1000), mounts +`/komposthaufen` read-write, and seeds its first download directory as +`/komposthaufen/Downloads`. The init and runtime probes reject a path that is +not bcachefs. The node's media-ready label and the shared +`scripts/media-storage-{offline,online}.sh` helpers stop and recreate the Pod +across bcachefs unmounts. Update arschrock's GitOps checkout before running +storage maintenance. + +The web UI uses the existing Traefik Authentik middleware. The peer Service +lets Kubernetes assign its LoadBalancer address; the newgw MikroTik operator +forwards 51413/TCP and 51413/UDP. The exporter exposes metrics only inside +the cluster and the chart creates a ServiceMonitor and alerts. + +The config PVC is authoritative Transmission state, including resume data and +settings. The download files on bcachefs are authoritative content. Neither +source is covered by the current backup owner in `apps/backup/`; this is an +explicit backup gap. Recover the service by restoring the config PVC and host +files from independently maintained copies, then let Argo recreate the +workload. No historical restore has been verified. diff --git a/apps/transmission/values.yaml b/apps/transmission/values.yaml new file mode 100644 index 0000000..bb3bdc6 --- /dev/null +++ b/apps/transmission/values.yaml @@ -0,0 +1,33 @@ +media: + hostPath: /komposthaufen + mountPath: /komposthaufen + downloadDir: /komposthaufen/Downloads +nodeSelector: + kubernetes.io/hostname: arschrock + media.brunner.ninja/multimedia-ready: "true" +tolerations: +- key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule +config: + storageClass: rook-ceph-block + size: 1Gi +timezone: Europe/Vienna +uid: "1000" +gid: "1000" +resources: + requests: + cpu: 100m + memory: 256Mi +ingress: + enabled: true + host: transmission.brunner.ninja + annotations: + traefik.ingress.kubernetes.io/router.middlewares: default-authentik@kubernetescrd + traefik.ingress.kubernetes.io/router.entrypoints: websecure +peerService: + annotations: + mikrotik.brunner.ninja/router: newgw + mikrotik.brunner.ninja/forwardings: '[{"name":"peer-tcp","servicePort":"peer-tcp","dstAddressList":"WANs"},{"name":"peer-udp","servicePort":"peer-udp","dstAddressList":"WANs"}]' +monitoring: + enabled: true diff --git a/bootstrap/kustomization.yaml b/bootstrap/kustomization.yaml index caf8f3b..6d1d2e7 100644 --- a/bootstrap/kustomization.yaml +++ b/bootstrap/kustomization.yaml @@ -101,6 +101,7 @@ resources: - media-project.yaml - plex.yaml - jellyfin.yaml +- transmission.yaml - paperless-project.yaml - paperless-cnpg.yaml - paperless-postgresql.yaml diff --git a/bootstrap/media-project.yaml b/bootstrap/media-project.yaml index 2ebd5c6..2c2cc0f 100644 --- a/bootstrap/media-project.yaml +++ b/bootstrap/media-project.yaml @@ -4,7 +4,7 @@ metadata: name: media namespace: argocd spec: - description: Media and read-only file servers pinned to arschrock + description: Media services pinned to arschrock sourceRepos: - ghcr.io/ernail/charts - https://brunner.ninja/charts @@ -16,6 +16,8 @@ spec: server: https://kubernetes.default.svc - namespace: jellyfin server: https://kubernetes.default.svc + - namespace: transmission + server: https://kubernetes.default.svc namespaceResourceWhitelist: - group: "" kind: ServiceAccount @@ -27,6 +29,8 @@ spec: kind: Service - group: apps kind: Deployment + - group: networking.k8s.io + kind: Ingress - group: traefik.io kind: IngressRoute - group: traefik.io diff --git a/bootstrap/transmission.yaml b/bootstrap/transmission.yaml new file mode 100644 index 0000000..3999423 --- /dev/null +++ b/bootstrap/transmission.yaml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: transmission + namespace: argocd +spec: + project: media + sources: + - repoURL: https://brunner.ninja/charts + chart: transmission + targetRevision: 4.1.4 + helm: + releaseName: transmission + valueFiles: + - $values/apps/transmission/values.yaml + - repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git + targetRevision: main + ref: values + destination: + server: https://kubernetes.default.svc + namespace: transmission + syncPolicy: + automated: + enabled: true + prune: true + selfHeal: true diff --git a/scripts/media-storage-offline.sh b/scripts/media-storage-offline.sh index 31163a3..3d6e62a 100644 --- a/scripts/media-storage-offline.sh +++ b/scripts/media-storage-offline.sh @@ -32,7 +32,7 @@ if ! kubectl label node "${node}" media.brunner.ninja/multimedia-ready- 2>/dev/n fi fi -for namespace in plex jellyfin copyparty; do +for namespace in plex jellyfin copyparty transmission; do scheduled_pods=$(kubectl --namespace "${namespace}" get pods \ --selector="app.kubernetes.io/component=server" \ --field-selector="spec.nodeName=${node}" \ @@ -64,7 +64,7 @@ if ((${#paper_pods[@]})); then done fi -for namespace in plex jellyfin copyparty; do +for namespace in plex jellyfin copyparty transmission; do remaining_pods=$(kubectl --namespace "${namespace}" get pods \ --selector="app.kubernetes.io/component=server" \ --field-selector="spec.nodeName=${node}" \ @@ -75,4 +75,4 @@ for namespace in plex jellyfin copyparty; do fi done -echo "Plex, Jellyfin, Copyparty and Paper are stopped on ${node}. Replacements stay Pending until their storage-ready labels return." +echo "Plex, Jellyfin, Copyparty, Transmission and Paper are stopped on ${node}. Replacements stay Pending until their storage-ready labels return." diff --git a/scripts/media-storage-online.sh b/scripts/media-storage-online.sh index a71f9f3..7191617 100644 --- a/scripts/media-storage-online.sh +++ b/scripts/media-storage-online.sh @@ -45,7 +45,7 @@ for attempt in $(seq 1 60); do exit 1 fi fi - for namespace in plex jellyfin copyparty; do + for namespace in plex jellyfin copyparty transmission; do mapfile -t pods < <( kubectl --namespace "${namespace}" get pods \ --selector="app.kubernetes.io/component=server" \ @@ -79,7 +79,7 @@ for attempt in $(seq 1 60); do else echo "Whisparr remains stopped; its /mnt Bcachefs library is not ready." fi - echo "${node} is media-ready; Plex, Jellyfin, Copyparty and Paper may now be scheduled." + echo "${node} is media-ready; Plex, Jellyfin, Copyparty, Transmission and Paper may now be scheduled." exit 0 fi sleep 2