Replace a Pool
const url = 'https://example.com/apis/nodus.dev/v1/namespaces/example/pools/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"apiVersion":"example","kind":"example","metadata":{"annotations":{"additionalProperty":"example"},"creationTimestamp":"example","deletionGracePeriodSeconds":1,"deletionTimestamp":"example","finalizers":["example"],"generateName":"example","generation":1,"labels":{"additionalProperty":"example"},"managedFields":[{"apiVersion":"example","fieldsType":"example","fieldsV1":{"additionalProperty":"example"},"manager":"example","operation":"example","subresource":"example","time":"example"}],"name":"example","namespace":"example","ownerReferences":[{"apiVersion":"example","blockOwnerDeletion":true,"controller":true,"kind":"example","name":"example","uid":"example"}],"resourceVersion":"example","selfLink":"example","uid":"example"},"spec":{"act":{"mode":"example","paused":true,"policies":[{"action":"example","duration":"example","idleFor":"example","maxGPUs":1,"maxRateUSDPerHour":"example","maxWaitTimeout":"example","minWaitTimeout":"example","schedule":"example"}]},"predict":{"enabled":true,"horizon":"example"},"routing":{"burstToMarket":"example","mode":"example","waitPolicy":"example","waitTimeout":"example"},"sandboxCapable":true},"status":{"act":{"lastActionTime":"example","pending":1},"capacity":{"gpus":{"additionalProperty":{"free":1,"total":1}},"nodes":1,"readyNodes":1},"conditions":[{"lastTransitionTime":"example","message":"example","observedGeneration":1,"reason":"example","status":"example","type":"example"}],"forecast":{"generatedTime":"example","horizon":"example","peakDemandGPUs":{"p50":1,"p90":1},"shortfallTime":"example"},"phase":"example","predict":{"enabledTime":"example"},"routing":{"burstPending":1,"consent":{"rateUSD":"example","time":"example"},"waiting":1},"utilization":{"deviceHours":"example","gpuPercent":1,"window":"example"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/apis/nodus.dev/v1/namespaces/example/pools/example \ --header 'Content-Type: application/json' \ --data '{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "spec": { "act": { "mode": "example", "paused": true, "policies": [ { "action": "example", "duration": "example", "idleFor": "example", "maxGPUs": 1, "maxRateUSDPerHour": "example", "maxWaitTimeout": "example", "minWaitTimeout": "example", "schedule": "example" } ] }, "predict": { "enabled": true, "horizon": "example" }, "routing": { "burstToMarket": "example", "mode": "example", "waitPolicy": "example", "waitTimeout": "example" }, "sandboxCapable": true }, "status": { "act": { "lastActionTime": "example", "pending": 1 }, "capacity": { "gpus": { "additionalProperty": { "free": 1, "total": 1 } }, "nodes": 1, "readyNodes": 1 }, "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "forecast": { "generatedTime": "example", "horizon": "example", "peakDemandGPUs": { "p50": 1, "p90": 1 }, "shortfallTime": "example" }, "phase": "example", "predict": { "enabledTime": "example" }, "routing": { "burstPending": 1, "consent": { "rateUSD": "example", "time": "example" }, "waiting": 1 }, "utilization": { "deviceHours": "example", "gpuPercent": 1, "window": "example" } } }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project.
The object’s name.
Query Parameters
Section titled “ Query Parameters ”Header Parameters
Section titled “ Header Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”Pool is a set of the customer’s own hosts that Nodus measures, routes work onto, forecasts and manages.
object
object
object
object
object
object
object
PoolSpec is the desired behavior of a Pool.
object
PoolAct configures the Act tier.
object
Mode is Off, Shadow, Propose or Auto. Default Off.
Paused is the kill switch: running actions stop at their next safe point and pending ones are canceled.
Policies are the actions Act may take, at most 16.
PoolActPolicy is one automated action and its bounds.
object
Action is IdleReclaim, Drain, Defragment, WaitTuning or Burst.
Duration is the length of a Drain window.
IdleFor is how long a host must be idle before IdleReclaim returns it.
MaxGPUs caps the GPUs a Burst policy pre-approves.
MaxRateUSDPerHour caps the market rate a Burst policy pre-approves, as a decimal string.
MaxWaitTimeout bounds the wait timeout a Job may ask for in this Pool.
MinWaitTimeout and MaxWaitTimeout bound WaitTuning.
Schedule is the cron expression that opens a Drain window.
PoolPredict configures the Predict tier.
object
Enabled turns forecasts and recommendations on; enabling needs billing:write and rate consent.
Horizon is how far forecasts look ahead, from 24h to 720h. Default 168h.
PoolRouting is the Pool’s placement policy for pool-routed work.
object
BurstToMarket is Allow, Approve or Deny. Default Approve.
Mode is Prefer (Pool first, then the market per burstToMarket) or Only (never the market). Default Prefer.
WaitPolicy is Never, Cheaper or Timeout. Default Timeout.
WaitTimeout bounds the wait for Pool capacity under waitPolicy Timeout, from 1m to 24h. Default 30m.
SandboxCapable lets the Pool’s hosts also run CPU Sandboxes under gVisor.
PoolStatus is the observed state of a Pool.
object
PoolActStatus counts open actions.
object
LastActionTime is when the latest PoolAction was created.
Pending counts PoolActions waiting for a decision.
PoolCapacity is the Pool’s inventory.
object
GPUs counts devices per accelerator model.
object
DeviceCounts counts one device model’s devices.
object
Free is the number of devices with no work.
Total is the number of devices.
Nodes is the number of enrolled hosts.
ReadyNodes is the number of hosts that are Ready.
Conditions carries the Pool’s conditions.
object
PoolForecastSummary is the headline of the latest forecast.
object
GeneratedTime is when the forecast was made.
Horizon is how far ahead the forecast looks.
Band is a forecast’s median and 90th percentile.
object
P50 is the median.
P90 is the 90th percentile.
ShortfallTime is the first hour the p90 demand exceeds the Pool’s devices, when inside the horizon.
Phase is the Pool’s lifecycle phase.
PoolPredictStatus is Predict’s billing anchor.
object
EnabledTime is when Predict was enabled; the Predict fee is billed from it.
PoolRoutingStatus counts pool-routed objects that are not placed yet.
object
BurstPending counts burst decisions waiting for approval.
PriceConsent records the platform price a caller agreed to and when.
object
RateUSD is the agreed rate in US dollars, as a decimal string.
Time is when the caller agreed.
Waiting counts pool-routed objects waiting for capacity.
PoolUtilization summarizes a window of utilization.
object
Decimal device-hours of Nodus-scheduled work
GPUPercent is the GPU busy share over the window, in percent.
Window is the window the summary covers.
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "spec": { "act": { "mode": "example", "paused": true, "policies": [ { "action": "example", "duration": "example", "idleFor": "example", "maxGPUs": 1, "maxRateUSDPerHour": "example", "maxWaitTimeout": "example", "minWaitTimeout": "example", "schedule": "example" } ] }, "predict": { "enabled": true, "horizon": "example" }, "routing": { "burstToMarket": "example", "mode": "example", "waitPolicy": "example", "waitTimeout": "example" }, "sandboxCapable": true }, "status": { "act": { "lastActionTime": "example", "pending": 1 }, "capacity": { "gpus": { "additionalProperty": { "free": 1, "total": 1 } }, "nodes": 1, "readyNodes": 1 }, "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "forecast": { "generatedTime": "example", "horizon": "example", "peakDemandGPUs": { "p50": 1, "p90": 1 }, "shortfallTime": "example" }, "phase": "example", "predict": { "enabledTime": "example" }, "routing": { "burstPending": 1, "consent": { "rateUSD": "example", "time": "example" }, "waiting": 1 }, "utilization": { "deviceHours": "example", "gpuPercent": 1, "window": "example" } }}Responses
Section titled “ Responses ”OK
Pool is a set of the customer’s own hosts that Nodus measures, routes work onto, forecasts and manages.
object
object
object
object
object
object
object
PoolSpec is the desired behavior of a Pool.
object
PoolAct configures the Act tier.
object
Mode is Off, Shadow, Propose or Auto. Default Off.
Paused is the kill switch: running actions stop at their next safe point and pending ones are canceled.
Policies are the actions Act may take, at most 16.
PoolActPolicy is one automated action and its bounds.
object
Action is IdleReclaim, Drain, Defragment, WaitTuning or Burst.
Duration is the length of a Drain window.
IdleFor is how long a host must be idle before IdleReclaim returns it.
MaxGPUs caps the GPUs a Burst policy pre-approves.
MaxRateUSDPerHour caps the market rate a Burst policy pre-approves, as a decimal string.
MaxWaitTimeout bounds the wait timeout a Job may ask for in this Pool.
MinWaitTimeout and MaxWaitTimeout bound WaitTuning.
Schedule is the cron expression that opens a Drain window.
PoolPredict configures the Predict tier.
object
Enabled turns forecasts and recommendations on; enabling needs billing:write and rate consent.
Horizon is how far forecasts look ahead, from 24h to 720h. Default 168h.
PoolRouting is the Pool’s placement policy for pool-routed work.
object
BurstToMarket is Allow, Approve or Deny. Default Approve.
Mode is Prefer (Pool first, then the market per burstToMarket) or Only (never the market). Default Prefer.
WaitPolicy is Never, Cheaper or Timeout. Default Timeout.
WaitTimeout bounds the wait for Pool capacity under waitPolicy Timeout, from 1m to 24h. Default 30m.
SandboxCapable lets the Pool’s hosts also run CPU Sandboxes under gVisor.
PoolStatus is the observed state of a Pool.
object
PoolActStatus counts open actions.
object
LastActionTime is when the latest PoolAction was created.
Pending counts PoolActions waiting for a decision.
PoolCapacity is the Pool’s inventory.
object
GPUs counts devices per accelerator model.
object
DeviceCounts counts one device model’s devices.
object
Free is the number of devices with no work.
Total is the number of devices.
Nodes is the number of enrolled hosts.
ReadyNodes is the number of hosts that are Ready.
Conditions carries the Pool’s conditions.
object
PoolForecastSummary is the headline of the latest forecast.
object
GeneratedTime is when the forecast was made.
Horizon is how far ahead the forecast looks.
Band is a forecast’s median and 90th percentile.
object
P50 is the median.
P90 is the 90th percentile.
ShortfallTime is the first hour the p90 demand exceeds the Pool’s devices, when inside the horizon.
Phase is the Pool’s lifecycle phase.
PoolPredictStatus is Predict’s billing anchor.
object
EnabledTime is when Predict was enabled; the Predict fee is billed from it.
PoolRoutingStatus counts pool-routed objects that are not placed yet.
object
BurstPending counts burst decisions waiting for approval.
PriceConsent records the platform price a caller agreed to and when.
object
RateUSD is the agreed rate in US dollars, as a decimal string.
Time is when the caller agreed.
Waiting counts pool-routed objects waiting for capacity.
PoolUtilization summarizes a window of utilization.
object
Decimal device-hours of Nodus-scheduled work
GPUPercent is the GPU busy share over the window, in percent.
Window is the window the summary covers.
Example generated
{ "apiVersion": "example", "kind": "example", "metadata": { "annotations": { "additionalProperty": "example" }, "creationTimestamp": "example", "deletionGracePeriodSeconds": 1, "deletionTimestamp": "example", "finalizers": [ "example" ], "generateName": "example", "generation": 1, "labels": { "additionalProperty": "example" }, "managedFields": [ { "apiVersion": "example", "fieldsType": "example", "fieldsV1": { "additionalProperty": "example" }, "manager": "example", "operation": "example", "subresource": "example", "time": "example" } ], "name": "example", "namespace": "example", "ownerReferences": [ { "apiVersion": "example", "blockOwnerDeletion": true, "controller": true, "kind": "example", "name": "example", "uid": "example" } ], "resourceVersion": "example", "selfLink": "example", "uid": "example" }, "spec": { "act": { "mode": "example", "paused": true, "policies": [ { "action": "example", "duration": "example", "idleFor": "example", "maxGPUs": 1, "maxRateUSDPerHour": "example", "maxWaitTimeout": "example", "minWaitTimeout": "example", "schedule": "example" } ] }, "predict": { "enabled": true, "horizon": "example" }, "routing": { "burstToMarket": "example", "mode": "example", "waitPolicy": "example", "waitTimeout": "example" }, "sandboxCapable": true }, "status": { "act": { "lastActionTime": "example", "pending": 1 }, "capacity": { "gpus": { "additionalProperty": { "free": 1, "total": 1 } }, "nodes": 1, "readyNodes": 1 }, "conditions": [ { "lastTransitionTime": "example", "message": "example", "observedGeneration": 1, "reason": "example", "status": "example", "type": "example" } ], "forecast": { "generatedTime": "example", "horizon": "example", "peakDemandGPUs": { "p50": 1, "p90": 1 }, "shortfallTime": "example" }, "phase": "example", "predict": { "enabledTime": "example" }, "routing": { "burstPending": 1, "consent": { "rateUSD": "example", "time": "example" }, "waiting": 1 }, "utilization": { "deviceHours": "example", "gpuPercent": 1, "window": "example" } }}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}