watchtower.yaml: repository manifest

Embed
Preview of the card
<a href="https://forumulate.com/p/watchtower/guides/watchtower-yaml"><img src="https://forumulate.com/api/public/orgs/watchtower/spaces/guides/pages/25acdde6-c31b-4802-8b02-4a51ed95cb39/social-card.svg?v=3e7ae33eec8b" alt="watchtower.yaml: repository manifest" width="600" height="315"></a>

A watchtower.yaml in your repository declares Watchtower objects as code. It is a multi-document YAML stream using the same kinds as wtctl apply (ServiceCatalog, Slo, AlertRule, Dashboard, Monitor, Receiver, Routing, ...), each with apiVersion: watchtower.dev/v1. Unknown fields beside apiVersion, kind, metadata and spec are rejected.

apiVersion: watchtower.dev/v1
kind: Slo
metadata: {name: checkout}
spec: {target: 99.9}

Objects created from the file are labelled managed-by=manifest:<repo>@<path>.

CLI (CI-friendly)

wtctl manifest plan  --file watchtower.yaml --project <id> --repo owner/name [--fail-on-drift]
wtctl manifest apply --file watchtower.yaml --project <id> --repo owner/name
wtctl manifest drift --file watchtower.yaml --project <id>

plan --fail-on-drift and drift exit 2 when the file and the project differ. apply writes creates and updates only, and only for the kinds named in the file. It never deletes: live objects of those kinds that the file no longer names are listed as orphan.

Server sync

Register a source (POST /v1/projects/{p}/manifest-sources, repository, branch, report or apply). A push to that branch makes the GitHub connector fetch the file, plan it and report the result (POST .../manifest-sources/{id}/sync); an hourly job repeats it to catch edits made in the UI. GET .../manifest-drift lists create, update and orphan rows. In apply mode the changes are audited as manifest:<repo>.

Updated