Post

Sonarr Configuration Cutover to QNAP Storage

Sonarr Configuration Cutover to QNAP Storage

I updated the Sonarr deployment to use QNAP storage and added verification and transfer logic to the init container, ensuring a smooth cutover while preserving existing PostgreSQL-backed configuration.

Sonarr Init Container Enhancements

I extended the values.yaml for Sonarr with a new python init container that verifies the configuration file, synchronizes the directory, copies files with proper permissions, and publishes the configuration under active on the QNAP claim. The documentation now describes the cutover process, including stopping the previous writer, mounting the claim read‑only, and restoring fresh‑start support on the QNAP claim after the new configuration is active.

Verification via Offline Checks and New Test

The offline checks script was updated to invoke the new sonarr-config-transfer-test.py test, which exercises the file transfer logic inside the rendered init container. The test creates temporary source and target directories, writes a fixture configuration, runs the init container command, and asserts that the transfer succeeds while handling stale database files, providing early feedback before the change reaches production.

Operational Impact and Next Verification

The cutover requires retaining the old mount until the new QNAP claim is active and a current backup is validated, after which the integration readers can be moved and the local mount removed. The next verification step is to run the updated CI pipeline against rendered manifests to confirm that the live resource reflects the new defaults and that the init container behaves as expected in a staging environment.

This post is licensed under CC BY 4.0 by the author.