socialweb.computer

Request and provide VMs on an atproto compute market.

lexicons and xrpc

lexicon

com.publicdomainrelay.temp.cluster.createCluster

procedure HTTP POST /xrpc/com.publicdomainrelay.temp.cluster.createCluster

The gateway creates the named cluster of the calling account and leaves it RUNNING, in one call. This is the same create-on-read path getKubeconfig walks - the account workspace, its home, the Cluster record and the mounted child - followed by the same desired-state flip controlPlaneUp performs, so a door that wants a cluster it can immediately reach does not have to read a kubeconfig it will throw away and then wake the control plane in a second round trip. Idempotent in both halves: a second call finds the tree it made and patches a desired state that is already true. Requires a service-auth JWT from the CALLER's own PDS; the account is the VERIFIED token's iss and never read from this input. The response is the phase as of this call, so a caller that sees Initializing knows the tree exists and the control plane is still coming up, and can poll controlPlaneUp - which is where the 429 and its Retry-After live, because that is the verb a client-go driven caller retries on.

input

encoding application/json

fieldtypedescription
name *string
The cluster label, unique within the calling account. RFC-1123 label, <=63 characters.

output

encoding application/json

fieldtypedescription
phase *string
The cluster's phase as of this call, after the desired state was set to running. Initializing means the control plane is still coming up; the cluster exists either way.
knownValues ["Unavailable","Initializing","Ready","Draining"]

errors

errordescription
InvalidRequestName absent, or not a legal RFC-1123 label within 63 characters.
UnauthorizedMissing or invalid service-auth token. Also returned when the token's aud is not this service or its lxm is not this method.
IdentityRevokedThe caller's identity carries a deny record for this account. The deny is written before any deletion, so it refuses while the revocation is still propagating - and it refuses BEFORE anything is created, which is what keeps create-on-read from re-arming a revoked account.
ClusterNotFoundThe tree was created and the Cluster was not readable immediately after. Deliberately indistinguishable from a name that belongs to another account.
ClusterDrainingThe cluster is being torn down and its desired state is frozen. Not retryable: a Draining cluster cannot be un-drained, by design - a cancellable teardown gate is a gate an operator clears to make the symptom go away.
ClusterUnavailable503: the gateway could not resolve the token issuer's signing key in time, could not read the caller's deny record, or could not prepare the cluster. Retry.
InternalError500: a failure the gateway maps to no named error.

used in

no page of these docs names it yet.

raw schema: lexicons/com/publicdomainrelay/temp/cluster/createCluster.json
{
  "lexicon": 1,
  "id": "com.publicdomainrelay.temp.cluster.createCluster",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "The gateway creates the named cluster of the calling account and leaves it RUNNING, in one call. This is the same create-on-read path getKubeconfig walks - the account workspace, its home, the Cluster record and the mounted child - followed by the same desired-state flip controlPlaneUp performs, so a door that wants a cluster it can immediately reach does not have to read a kubeconfig it will throw away and then wake the control plane in a second round trip. Idempotent in both halves: a second call finds the tree it made and patches a desired state that is already true. Requires a service-auth JWT from the CALLER's own PDS; the account is the VERIFIED token's iss and never read from this input. The response is the phase as of this call, so a caller that sees Initializing knows the tree exists and the control plane is still coming up, and can poll controlPlaneUp - which is where the 429 and its Retry-After live, because that is the verb a client-go driven caller retries on.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "name"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "The cluster label, unique within the calling account. RFC-1123 label, <=63 characters."
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "phase"
          ],
          "properties": {
            "phase": {
              "type": "string",
              "knownValues": [
                "Unavailable",
                "Initializing",
                "Ready",
                "Draining"
              ],
              "description": "The cluster's phase as of this call, after the desired state was set to running. Initializing means the control plane is still coming up; the cluster exists either way."
            }
          }
        }
      },
      "errors": [
        {
          "name": "InvalidRequest",
          "description": "Name absent, or not a legal RFC-1123 label within 63 characters."
        },
        {
          "name": "Unauthorized",
          "description": "Missing or invalid service-auth token. Also returned when the token's aud is not this service or its lxm is not this method."
        },
        {
          "name": "IdentityRevoked",
          "description": "The caller's identity carries a deny record for this account. The deny is written before any deletion, so it refuses while the revocation is still propagating - and it refuses BEFORE anything is created, which is what keeps create-on-read from re-arming a revoked account."
        },
        {
          "name": "ClusterNotFound",
          "description": "The tree was created and the Cluster was not readable immediately after. Deliberately indistinguishable from a name that belongs to another account."
        },
        {
          "name": "ClusterDraining",
          "description": "The cluster is being torn down and its desired state is frozen. Not retryable: a Draining cluster cannot be un-drained, by design - a cancellable teardown gate is a gate an operator clears to make the symptom go away."
        },
        {
          "name": "ClusterUnavailable",
          "description": "503: the gateway could not resolve the token issuer's signing key in time, could not read the caller's deny record, or could not prepare the cluster. Retry."
        },
        {
          "name": "InternalError",
          "description": "500: a failure the gateway maps to no named error."
        }
      ]
    }
  }
}