Deployments
Preview

Compare the snapshot a deployment runs with the cluster

The objects that differ between the snapshot running and the cluster, as the operator last found them, by object. In each field `from` is the live value and `to` is the value the snapshot sets. An object missing from the cluster is `added`.

GET
/deployments/{deploymentId}/live-diff
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

deploymentId*string
Formatuuid
limit?integer

Page size. Defaults to 50, at most 200.

Range1 <= value <= 200
Default50
cursor?string

Opaque cursor from a previous page's nextCursor.

appId?string

Only the resources of this app of the deployment. The counts by app still cover every app.

Formatuuid
snapshotId?string

For an imported deployment that observes, compare this snapshot of the deployment instead of the one it wants; ask for its comparison with POST /deployments/{deploymentId}/import/checks first. 404 import.observation_not_found for a snapshot that was not compared, or is not this deployment's. Any other deployment answers 400 diff.snapshot_not_observed.

Formatuuid

Response Body

A page of objects.

application/json
  1. response
snapshotId*string

The snapshot running, which the cluster was compared with.

Formatuuid
checkedAt?string

When the operator last checked. Absent before the first check.

Formatdate-time
counts*
apps*array<>

The counts by app, over every page.

items*array<>
nextCursor?string
observation?

How the comparison of an imported deployment's render with what Argo CD or Flux applied stands. The result of the latest check stays while the next is under way.

Example Request
curl -X GET 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/live-diff'
Example Response
{  "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",  "checkedAt": "2019-08-24T14:15:22Z",  "counts": {    "added": 0,    "removed": 0,    "changed": 0  },  "apps": [    {      "appId": "28c365d5-df94-4a54-8217-3ce51d068868",      "appName": "string",      "added": 0,      "removed": 0,      "changed": 0    }  ],  "items": [    {      "before": "string",      "after": "string",      "appId": "28c365d5-df94-4a54-8217-3ce51d068868",      "appName": "string",      "group": "string",      "version": "string",      "kind": "string",      "namespace": "string",      "name": "string",      "change": "added",      "fields": [        {          "path": "string",          "change": "added",          "from": "string",          "to": "string"        }      ],      "review": {        "state": "open",        "change": "changed",        "fingerprint": "string",        "words": "string",        "scope": "annotations",        "count": 0,        "classes": [          "content"        ],        "imagePin": "same_digest",        "hook": true,        "acceptedBy": {          "id": "string",          "name": "string"        },        "acceptedAt": "2019-08-24T14:15:22Z",        "reason": "string"      }    }  ],  "nextCursor": "string",  "observation": {    "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",    "snapshotSha": "string",    "current": true,    "state": "pending",    "outcome": "ok",    "message": "string",    "checkedAt": "2019-08-24T14:15:22Z",    "requestedAt": "2019-08-24T14:15:22Z",    "counts": {      "same": 0,      "open": 0,      "accepted": 0,      "expected": 0,      "ignored": 0    },    "ready": true,    "blockers": [      "not_checked"    ],    "inventorySource": "tool_status",    "truncated": true,    "denied": {      "verb": "string",      "group": "string",      "resource": "string",      "namespace": "string",      "user": "string"    },    "serviceAccountNamespace": "string",    "serviceAccountName": "string",    "intervalSeconds": 0  }}