Clusters
Preview

Replace a cluster's settings

Agents may run on a production cluster once someone acknowledges the warning (`acknowledgeAgentsProduction`); moving a cluster to the production tier takes that acknowledgement back. `kube-system` and `wardn-system` are never managed and cannot be listed.

PUT
/clusters/{clusterId}/settings
cookiebetter-auth.session_token<token>

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

clusterId*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
namespaces*
secretsProvider*string
Value in"none""sops""eso"
agentSandboxes*boolean
prepareNamespaces?boolean

Turns the preparation of namespaces on or off. Left out, the switch stays as it is.

acknowledgeAgentsProduction?boolean

Set to turn agents on for a production cluster: it says the warning was read (agents there read production state through MCP and use the cluster's compute). Without it that change is refused with cluster.settings.agents_production_ack.

Response Body

The updated settings.

application/json
  1. response
namespacePreparation*

What the cluster's operator says its own RBAC lets it do to prepare a deployment's namespace (make it, make the service account and role binding in it, and bind the wardn-preview-deployer and admin ClusterRoles).

labelUsage*array<>

The cluster's labels by key, each with the guardrails that select clusters by it. Guardrails arrive with M3, so every list is empty for now; the field is here so screens can show "Used by" already.

namespaces*
neverManaged*array<string>

Namespaces Wardn never manages, whatever the mode.

secretsProvider*string
Value in"none""sops""eso"
agentSandboxes*boolean

Whether agents run in the cluster (their runtime is installed there and jobs may be placed on it). On a production cluster it needs the warning acknowledged first.

prepareNamespaces*boolean

Whether Wardn prepares a deployment's namespace before it applies there: the namespace, a wardn-deployer service account and a role binding to the admin ClusterRole. On by default for development and staging clusters, off for production, until someone chooses. Turning it on is refused (409, cluster.settings.prepare_unsupported) while the operator says it cannot prepare namespaces.

agentsProductionAcknowledgedAt*|

When someone acknowledged the warning for agents on this production cluster. Null until then, and again after the cluster becomes production. Always null on a cluster that is not production.

Formatdate-time
updatedAt*|

Null while the cluster has the defaults.

Formatdate-time
Example Request
curl -X PUT 'https://wardn.example.com/api/v1/clusters/497f6eca-6276-4993-bfeb-53cbbbba6f08/settings' \  -H 'Content-Type: application/json' \  -d '{  "namespaces": {    "mode": "all",    "names": [      "string"    ]  },  "secretsProvider": "none",  "agentSandboxes": true}'
Example Response
{  "namespacePreparation": {    "status": "unknown",    "missing": [      "string"    ],    "reportedAt": "2019-08-24T14:15:22Z"  },  "labelUsage": [    {      "key": "string",      "value": "string",      "guardrails": [        {          "id": "string",          "name": "string"        }      ]    }  ],  "namespaces": {    "mode": "all",    "names": [      "string"    ]  },  "neverManaged": [    "string"  ],  "secretsProvider": "none",  "agentSandboxes": true,  "prepareNamespaces": true,  "agentsProductionAcknowledgedAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}