Resources / Watchdog
Watchdog
The watch over a component that runs the release controller itself (spec 0047 section 3 'Not being able to roll itself back'): a bad build of it has nothing behind it to roll it back. The component's own Worker writes a heartbeat on each pass; a pass in another Worker reads it, and when a new version took all the traffic and the heartbeat stays away for the grace time it moves the traffic back to the previous version, once, asks the active release to record it and opens an Incident.
Overview
| API | platform.etorm.com/v1alpha1 |
| Resource | watchdogs (cluster-scoped inside its cluster) |
| Short names | wd |
| Available in | the platform only |
| Status | written by a controller through /status |
Minimal example
apiVersion: platform.etorm.com/v1alpha1 kind: Watchdog metadata: name: example spec: component: "<component>" script: "<script>"
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
component | string | yes | length 1 to 63 | The component of a release this watches (for example operator). | |
script | string | yes | length 1 to 63 | The name of its Worker script at the provider. | |
graceSeconds | integer | 600 | 120 to 3600 | How long a new version has to report after it took all the traffic. |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
heartbeat | object | The component's own sign of life (written by the component's Worker, not by the watchdog). | |||
heartbeat.at | integer | Unix time of the last heartbeat. | |||
heartbeat.by | string | Who wrote it. | |||
observed | object | The version that has all the traffic, the one before it and when it took it. | |||
observed.current | string | The version id with all the traffic. | |||
observed.previous | string | The version id it replaced. | |||
observed.since | integer | Unix time the watchdog first saw it with all the traffic. | |||
observed.commit | string | The commit the deploy recorded on this version (its tag); empty when the deploy recorded none. The invariant build-matches-deploy compares it with the build the host reports. | |||
rolledBackFrom | string | The version the watchdog moved the traffic away from (it never does it twice to the same one). | |||
phase | string (one of) | Healthy, Waiting, RolledBack, NeedsHuman, Unknown | Healthy when the component reports after its latest version; Waiting during the grace time; RolledBack after the one rollback; NeedsHuman when there is nothing safe to do; Unknown when the provider cannot be read or the traffic is split. | ||
message | string | What the watchdog sees. | |||
lastCheckedAt | integer | Unix time of the last pass. |
Columns in listings
| Column | From |
|---|---|
| Component | .spec.component |
| Phase | .status.phase |
| Version | .status.observed.current |