Deployments
Preview

Compare an imported deployment with its cluster again

Asks the cluster's operator to compare what Argo CD or Flux applied with Wardn's render again, as Refresh does: the snapshot the deployment wants, or `snapshotId`, another of its snapshots someone picked. A check already due or under way answers the request, and so does one asked for less than 10 se

POST
/deployments/{deploymentId}/import/checks
cookiebetter-auth.session_token<token>

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

deploymentId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
snapshotId?string

A snapshot of the deployment to compare instead of the one it wants.

Formatuuid

Response Body

The comparison asked for, as it stands.

application/json
  1. response

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.

snapshotId*string

The render compared.

Formatuuid
snapshotSha*string

The commit the render was made from, in full; people see its first 7 characters. Empty when unknown.

current*boolean

True for the deployment's latest render; false for a snapshot someone picked.

state*string

pending waits to be sent; sent waits for the operator's report; done holds the latest result; operator_unsupported waits for an operator that can compare ("Upgrade the operator to compare").

Value in"pending""sent""done""operator_unsupported"
outcome?string

What the latest check could do; absent before the first result. account_forbidden means the service account is missing or may not read and dry-run in the namespace (denied says which request); source_unreadable that the tool's object could not be read, so objects only the tool runs could not be found; refused that the operator refused the check; failed that it failed as a whole.

Value in"ok""account_forbidden""source_unreadable""refused""failed"
message*string

The operator's sentence about the latest result; empty when there is none.

checkedAt?string

When the latest result was compared; absent before the first.

Formatdate-time
requestedAt*string

When the check was last asked for.

Formatdate-time
counts*

The objects of a comparison by where their review stands.

ready*boolean

The deployment's latest render was compared within two intervals by an operator that could, with nothing left out and every difference that needs a person accepted.

blockers*array<>

Why it is not ready, in this order; empty when it is.

inventorySource?string

How the objects the tool runs were found; absent before the first result or when they could not be.

Value in"tool_status""markers"
truncated*boolean

The result was too large to keep whole; some objects are left out.

denied?

The request the deployment's service account was refused. It names the request, never a value.

serviceAccountNamespace*string

The namespace of the service account the comparison acts as, which the cluster must have.

serviceAccountName*string

The service account the comparison acts as, wardn-deployer, the one cutover applies as.

intervalSeconds*integer

How often the latest render is compared again ("Checked every 3m").

Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/import/checks' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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}