1# Service dependencies and rollout
2
3Declare providers and requirements in Pkl. Provisioning allocates private
4inputs, and Nomad templates discover provider endpoints. Watched endpoint
5changes restart consumers; applications that persist internal endpoints must
6receive repeatable setup updates. [configure-arr.py](configure-arr.py), for
7example, derives Jackett/qBittorrent endpoints and remote path mappings from
8the service declarations.
9
10A successful non-sidecar prestart task is not rerun on every application
11restart. Dependent jobs therefore also need runtime retry and health recovery.
12The schema and renderer own retry delays, health-restart grace, and deployment
13deadlines. Verify the actual client connection after provider reallocation;
14a healthy application HTTP route alone does not prove database connectivity.
15
16The default single-allocation rollout stops the old writer before starting the
17new one. Writable SQLite stores cannot safely overlap writers. Stateless jobs
18can declare canary rollout when their ports and mounts allow it. Generated
19Caddy proxies retry connection failures while service discovery catches up;
20this does not guarantee uninterrupted long-running requests or WebSockets.
21
22A new cloned preview snapshots its service dataset, writable external ZFS
23mounts, and PostgreSQL dataset in one operation. An isolated PostgreSQL clone
24supplies the preview database. The temporary database clone is removed after
25copying. Repeating staging retains existing preview data; fresh isolation
26starts empty and rejects writable external mounts. Review outbound side
27effects independently of filesystem isolation.
28
29ZFS clones retain their source encryption root, even below the independently
30encrypted staging parent. Keep source keys available while clones exist.
31Fresh previews inherit staging encryption. Verify actual mount bindings before
32allowing disposable writes, especially read-only personal mounts.
33
34Inspect generated-job changes before expecting a restart. A provider script
35change can alter setup without changing a running job. Prepared startup files
36are included in task change detection; unrelated files are not. A Nomad plan
37reporting an in-place update alone does not establish that tasks will restart.