Xeonr Developer Docs

Update Cluster

POST
/containers.api.v1.ClusterService/UpdateCluster

Updates the fields named in update_mask and nothing else; an empty mask is InvalidArgument. The owner team's admins may change display_name, labels, grants and switch visibility between PRIVATE and SHARED. Setting visibility to GLOBAL, default, allow_runc and the everyone-grant (a grant with an empty team) are platform-admin-only; naming them in the mask otherwise is PermissionDenied. At most one cluster is default, and it must be GLOBAL. archive_interval_sec (how often mounted volumes are archived; 0 disables, unset in the mask restores the 6-hour default) is the owner team's on its own cluster and platform-admin-only on a GLOBAL one.

Access: admin of the owner team, or a platform admin. Other callers get NotFound.

Authorization

BearerAuth
AuthorizationBearer <token>

A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC token for humans. The key's namespace and role are pinned server-side.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

clusterId?string
Match^cl-[0-9a-f]{16}$
displayName?string|null
Length1 <= length <= 255
labels?
Propertiesproperties <= 32
visibility?ClusterVisibility|null

enum.defined_only = true

grants?

Full replace when named in the mask.

Itemsitems <= 200
default?boolean|null

validate:skip a bool has no bounds

allowRunc?boolean|null

validate:skip a bool has no bounds

updateMask?string

validate:skip an empty mask is refused by the server, naming the paths it accepts

archiveIntervalSec?integer|null

0 disables scheduled archives on the cluster; otherwise 15 minutes to 7 days. Named in the mask with no value, it returns to the default. archive_interval_sec // archive_interval_sec must be 0 (disabled) or between 900 and 604800

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://containers.xeonr.io/containers.api.v1.ClusterService/UpdateCluster" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "cluster": {
    "clusterId": "string",
    "displayName": "string",
    "ownerTeam": "string",
    "visibility": "CLUSTER_VISIBILITY_UNSPECIFIED",
    "grants": [
      {
        "team": "string",
        "quotaCpuMillis": 0,
        "quotaMemoryMb": 0,
        "quotaMaxPods": 0,
        "quotaStorageMb": 0,
        "quotaMaxVolumes": 0
      }
    ],
    "default": true,
    "allowRunc": true,
    "state": "CLUSTER_STATE_UNSPECIFIED",
    "lastSeen": "2023-01-15T01:30:15.01Z",
    "operatorVersion": "string",
    "capabilities": {
      "gvisor": true,
      "cpCsi": true,
      "previewIngress": true,
      "appIngress": true,
      "previewDomain": "string",
      "appDomain": "string"
    },
    "labels": {
      "property1": "string",
      "property2": "string"
    },
    "createdAt": "2023-01-15T01:30:15.01Z",
    "capacity": {
      "observedAt": "2023-01-15T01:30:15.01Z",
      "nodes": [
        {
          "name": "string",
          "ready": true,
          "allocatableCpuMillis": "string",
          "allocatableMemoryMb": "string",
          "allocatablePods": 0,
          "requestedCpuMillis": "string",
          "requestedMemoryMb": "string",
          "pods": 0,
          "volumeDiskFreeMb": "string"
        }
      ],
      "installCap": {
        "cpuMillis": "string",
        "memoryMb": "string",
        "pods": 0,
        "storageMb": "string",
        "volumes": 0
      },
      "installRequested": {
        "cpuMillis": "string",
        "memoryMb": "string",
        "pods": 0,
        "storageMb": "string",
        "volumes": 0
      }
    },
    "conditions": [
      {
        "type": "TYPE_UNSPECIFIED",
        "message": "string",
        "since": "2023-01-15T01:30:15.01Z",
        "pods": [
          "string"
        ]
      }
    ],
    "archiveIntervalSec": 0,
    "archivedBytes": "string"
  }
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}