Clusters
Preview

Register a cluster

The caller becomes the cluster's owner. Naming an environment also takes the right to manage that environment. With none named, an environment whose selector matches the cluster's labels may place it.

POST
/clusters
cookiebetter-auth.session_token<token>

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

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
name*string
Length1 <= length <= 63
cloud?string

Where the cluster runs. Optional, because the operator reads it from the nodes and fills it while it is empty or was detected, and never replaces one a person typed.

Lengthlength <= 40
region?string

The region of the cloud. Filled from the nodes like cloud.

Lengthlength <= 40
tier?ClusterTier

How much the cluster matters. Only production clusters count as production for billing. A cluster in an environment has the tier of that environment's class (production for the production class, development for development, staging for any other), and changing it on the cluster is refused with 409 cluster.tier_locked. A cluster in no environment keeps its own tier, which a person may set. Leave it out on create to take the environment's, or development outside one.

Value in"production""staging""development"
labels?

Up to 50 key and value pairs.

Propertiesproperties <= 50
paused?boolean
Defaultfalse
environmentId?|
Formatuuid

Response Body

The registered cluster.

application/json
  1. response
view*"full"
Value in"full"
id*string
Formatuuid
name*string
cloud*string
region*string
cloudDetected*boolean

True while the cloud came from the operator's reading of the nodes, not from a person.

regionDetected*boolean

True while the region came from the operator's reading of the nodes, not from a person.

tier*ClusterTier

How much the cluster matters. Only production clusters count as production for billing. A cluster in an environment has the tier of that environment's class (production for the production class, development for development, staging for any other), and changing it on the cluster is refused with 409 cluster.tier_locked. A cluster in no environment keeps its own tier, which a person may set. Leave it out on create to take the environment's, or development outside one.

Value in"production""staging""development"
labels*

Up to 50 key and value pairs.

Propertiesproperties <= 50
paused*boolean

A paused cluster gets no deliveries until it is resumed.

environmentId*|

The one environment the cluster belongs to, or null while it has none.

Formatuuid
owners*array<string>

User ids of the cluster's owners, oldest first.

ownerTeam*|

The team that owns the cluster, or null. People own it through the owner role.

operator*

The cluster's operator as Wardn last saw it.

reconciler*

What the cluster's apply queue is doing, read from the commands sent to its operator.

connection*
health*ClusterHealth

From the cluster's nodes: healthy when all are ready, degraded when some are, unhealthy when none is, unknown while the cluster has not reported.

Value in"healthy""degraded""unhealthy""unknown"
usage*

The totals of what the cluster's operator last reported. CPU is in millicores and memory in bytes.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/clusters' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "view": "full",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "cloud": "aws",  "region": "eu-west-1",  "cloudDetected": true,  "regionDetected": true,  "tier": "production",  "labels": {    "property1": "string",    "property2": "string"  },  "paused": true,  "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",  "owners": [    "string"  ],  "ownerTeam": {    "id": "string",    "name": "string"  },  "operator": {    "version": "1.4.2",    "protocolVersion": 0,    "online": true,    "lastHeartbeatAt": "2019-08-24T14:15:22Z",    "firstConnectedAt": "2019-08-24T14:15:22Z",    "connectedAt": "2019-08-24T14:15:22Z",    "lastDisconnect": {      "at": "2019-08-24T14:15:22Z",      "reason": "string",      "durationSeconds": 0    },    "refused": {      "reason": "revoked",      "since": "2019-08-24T14:15:22Z",      "lastAt": "2019-08-24T14:15:22Z"    },    "upgrade": {      "needed": true,      "reason": "current"    }  },  "reconciler": {    "driftCheckSeconds": 0,    "driftFound": 0,    "applying": 0,    "queued": 0,    "appliedToday": {      "succeeded": 0,      "failed": 0    },    "current": {      "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",      "since": "2019-08-24T14:15:22Z"    },    "lastApply": {      "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",      "outcome": "succeeded",      "at": "2019-08-24T14:15:22Z"    }  },  "connection": {    "state": "active",    "changedAt": "2019-08-24T14:15:22Z"  },  "health": "healthy",  "usage": {    "nodesTotal": 0,    "nodesReady": 0,    "cpuCapacityMillis": 0,    "cpuUsedMillis": 0,    "memoryCapacityBytes": 0,    "memoryUsedBytes": 0,    "podsCapacity": 0,    "podsRunning": 0,    "kubernetesVersion": "string",    "reportedAt": "2019-08-24T14:15:22Z"  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}