From d8301fa4316a8b25e1989c41b04fa4a8cda5c2b0 Mon Sep 17 00:00:00 2001 From: Yuto Nishida Date: Sun, 18 Oct 2026 16:19:10 -0700 Subject: [PATCH] orion: plan rdr-catchall --- .../plans/radarr-catchall.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 experimental/user-dirs/starptr.andref.app/plans/radarr-catchall.md diff --git a/experimental/user-dirs/starptr.andref.app/plans/radarr-catchall.md b/experimental/user-dirs/starptr.andref.app/plans/radarr-catchall.md new file mode 100644 index 0000000..18ccc37 --- /dev/null +++ b/experimental/user-dirs/starptr.andref.app/plans/radarr-catchall.md @@ -0,0 +1,61 @@ +# Add radarr-catchall to orion-system + +Create a general-purpose movie instance matching `sonarr-catchall`'s deployment and integration patterns. Reuse the existing Radarr constructor and movie naming rules, with its own configuration storage, API key, download category, and library roots. + +## Proposed configuration + +| Area | Configuration | +| --- | --- | +| Identity | Top-level field `radarrCatchall`; resource name and Tailscale hostname `radarr-catchall`; namespace `default` | +| Runtime | Existing pinned Radarr image, port `7878`, resource limits, readiness probe, and `Recreate` deployment strategy | +| Storage | Dedicated `radarr-catchall-config` 5Gi iSCSI PVC; shared `mdata` mounted at `/data` for same-filesystem imports from qBittorrent | +| Access | Tailscale-only ingress, matching the existing Radarr and Sonarr instances | +| Credentials | Independent SOPS-backed `radarrCatchall.apiKey`, supplied to both Radarr and Buildarr | +| Downloads | Existing qBittorrent service with category `radarr-catchall` | +| Indexers | Prowlarr application `Radarr Catchall`, linked to the Buildarr instance with `sync_level: 'full_sync'` | +| Library roots | `/data/library/Movies (Catchall)` and `/data/library/Animation Movies (Catchall)` | +| Naming | Shared Radarr movie and folder naming rules, including renaming, illegal-character replacement, and `colon_replacement: 'dash'` | +| Reconciliation | Existing hourly Buildarr schedule; preserve unmanaged download clients and root folders | + +## Implementation + +1. In [main.jsonnet](../../../../milky-way/environments/stage00/orion-system/main.jsonnet), rename the Radarr library import alias from `radarrForSdxarr` to `radarr` and update the existing constructor call. Keep the existing instance field `radarrForSdxarr`. Add the new instance beside it: + + ```jsonnet + radarrCatchall: radarr.new( + apiKey = secrets.radarrCatchall.apiKey, + tailscaleHostname = 'radarr-catchall', + name = 'radarr-catchall', + mediaVolumeClaimName = this.mdataPvc.metadata.name, + ), + ``` + + The existing [Radarr constructor](../../../../milky-way/lib/radarr.libsonnet) already emits the Secret, configuration PVC, Deployment, Service, and Tailscale ingress with the required defaults. + +2. Add a new independent `radarrCatchall.apiKey` to the encrypted source at `secrets/k8s-config/k8s-secret-values.jsonnet`. Follow the [secrets workflow](../../../../milky-way/secrets/readme.md) to refresh the decrypted sops-nix store before rendering. Consume it through the existing secrets registry. + +3. Extend `buildarrConfig` in `main.jsonnet`: + - Define `radarrCatchallInstanceName = 'radarr-catchall'`. + - Extract the existing Radarr naming fields into a shared `radarrNamingConfig`, analogous to `sonarrNamingConfig`, and use it for both Radarr instances. Keep instance-specific root folders separate. + - Add the new Radarr instance, deriving its hostname and web UI port from its Service and using the new API key. + - Configure qBittorrent from its Service with category `radarr-catchall`. Use Radarr's `hostname` field; Sonarr uses `host`. + - Declare both catchall roots using Radarr's `media_management.root_folders: { delete_unmanaged: false, definitions: [...] }` structure. Retain `download_clients.delete_unmanaged: false` globally and per instance. + - Assert that this instance's media volume is mounted at `/data`, matching the existing root-folder checks. + +4. Add `Radarr Catchall` under Prowlarr's application definitions, following `Sonarr Catchall`: type `radarr`, the new instance name, Service-derived `prowlarr_url` and `base_url`, and `sync_level: 'full_sync'`. Retain the existing SeaDexArr instance's disabled indexer sync and dedicated SeaDexArr wiring. + +## First deployment preparation + +- Create both library directories on `mdata` with permissions writable by the application's UID/GID `1000:1000`. +- Account for the fresh-instance compatibility issue documented in the existing Radarr naming configuration: the pinned Buildarr Radarr client cannot deserialize Radarr's default `colonReplacementFormat: 'smart'`. After Radarr is ready, initialize that naming value to `'dash'` through its API before the first successful Buildarr reconcile; subsequent reconciles hold it at `'dash'`. + +## Verification + +Use the existing [Orion verification and apply SOP](../../../../milky-way/environments/stage00/orion-system/CLAUDE.md#verify-before-and-after-applying) for rendering, diffing, applying, and checking workload health. Use the [Milky-Way command environment](../../../../milky-way/CLAUDE.md#running-commands-one-liner-pattern) and [Methanol cluster access instructions](../../../../milky-way/CLAUDE.md#remote-commands-on-methanol). The target is `environments/stage00/orion-system`, using kubectl context `methanol`. + +Check these change-specific outcomes during that workflow: + +1. The rendered configuration passes Buildarr validation. The diff adds the five `radarr-catchall` resources and updates Buildarr's configuration Secret and deployment checksum. Extracting shared naming rules preserves the existing Radarr instance's settings. +2. After applying and completing the naming bootstrap, the new PVC binds, Radarr becomes ready, and the Tailscale Web UI is reachable. Buildarr completes reconciliation without schema, authentication, or naming errors. +3. Radarr shows both catchall root folders, the shared naming settings, and the qBittorrent client with category `radarr-catchall`. Prowlarr shows `Radarr Catchall` with full sync and can successfully connect and sync applicable movie indexers. +4. Verify a representative movie download and completed import: the torrent uses the catchall category, the library file lands under the selected catchall root with the configured name, and the import uses a hardlink on `mdata` while the original remains available for seeding. -- 2.54.0