Skip to content

List or watch budgets

GET
/apis/nodus.dev/v1/budgets
curl --request GET \
--url https://example.com/apis/nodus.dev/v1/budgets
labelSelector
string
fieldSelector
string
limit
string
continue
string
watch
string
resourceVersion
string
allowWatchBookmarks
string
timeoutSeconds
string

OK

Media type application/json
object
apiVersion
string
items
required
Array<object>

Budget is an enforced money limit over the org, a project or a label selector, per UTC calendar month or in total. Every hold and renewal of work in scope must fit a Block Budget: when it is used up, work in scope stops gracefully with Funded=False (BudgetExceeded) and new creates fail with 402 BudgetExceeded. A Notify Budget only sends notices. Matching uses the project and the labels an object had at admission, so relabelling running work cannot escape a Budget, and a Budget created later binds running work from its next renewal.

object
apiVersion
string
kind
string
metadata
object
annotations
object
key
additional properties
string
creationTimestamp
string
deletionGracePeriodSeconds
integer format: int64
deletionTimestamp
string
finalizers
Array<string>
nullable
generateName
string
generation
integer format: int64
labels
object
key
additional properties
string
managedFields
Array<object>
nullable
object
apiVersion
string
fieldsType
string
fieldsV1
object
key
additional properties
manager
string
operation
string
subresource
string
time
string
name
string
namespace
string
ownerReferences
Array<object>
nullable
object
apiVersion
required
string
blockOwnerDeletion
boolean
controller
boolean
kind
required
string
name
required
string
uid
required
string
resourceVersion
string
selfLink
string
uid
string
spec
required

BudgetSpec is the limit, its period and its scope. Period and scope are immutable; the limit, action, thresholds and notify recipients can change.

object
action

Action is what happens at the limit: Block stops new holds and renewals in scope, Notify only notifies. Defaults to Block.

string
limitUSD
required

LimitUSD is the amount the period’s spend plus holds may reach, such as “2000.00”. It must be above 0.

string
notify

BudgetNotify names extra recipients of a Budget’s notices.

object
emails

Emails receive the threshold and exceeded notices beside the org’s billing recipients, at most 10.

Array<string>
nullable
period

Period is the accounting window: Monthly (the UTC calendar month) or Total (since creation). Defaults to Monthly. Immutable.

string
scope

BudgetScope narrows a Budget to a project, to objects matching a label selector, or both.

object
project

Project limits the Budget to one project’s objects and its storage; unset counts every project.

string
selector
object
matchExpressions
Array<object>
nullable
object
key
required
string
operator
required
string
values
Array<string>
nullable
matchLabels
object
key
additional properties
string
thresholds

Thresholds are the percentages of the limit at which a notice is sent, at most 5 values in 1-100, once per period each. Defaults to 50, 80 and 100.

Array<integer>
nullable
status

BudgetStatus is the current period’s accounting, rendered from the enforcement row whenever the Budget is read.

object
conditions

Conditions carry Exceeded (LimitReached) while nothing is left for a new hold.

Array<object>
nullable
object
lastTransitionTime
required
string
message
required
string
observedGeneration
integer format: int64
reason
required
string
status
required
string
type
required
string
currentPeriod

BudgetPeriodWindow is the current accounting window of a Budget.

object
endTime

EndTime is when the window ends; unset for Total.

string
startTime
required

StartTime is when the window started: the UTC month start, or the Budget’s creation for Total.

string
heldUSD

HeldUSD is what running work in scope holds against the limit.

string
notifiedThresholds

NotifiedThresholds are the thresholds whose notice was sent this period.

Array<integer>
nullable
percentUsed
required

PercentUsed is spent as a whole percentage of the limit.

integer format: int32
remainingUSD

RemainingUSD is limit minus spent minus held, never below 0.

string
spentUSD

SpentUSD is what the period’s captures charged.

string
kind
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
Example generated
{
"apiVersion": "example",
"items": [
{
"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": {
"action": "example",
"limitUSD": "example",
"notify": {
"emails": [
"example"
]
},
"period": "example",
"scope": {
"project": "example",
"selector": {
"matchExpressions": [
{
"key": "example",
"operator": "example",
"values": [
"example"
]
}
],
"matchLabels": {
"additionalProperty": "example"
}
}
},
"thresholds": [
1
]
},
"status": {
"conditions": [
{
"lastTransitionTime": "example",
"message": "example",
"observedGeneration": 1,
"reason": "example",
"status": "example",
"type": "example"
}
],
"currentPeriod": {
"endTime": "example",
"startTime": "example"
},
"heldUSD": "example",
"notifiedThresholds": [
1
],
"percentUsed": 1,
"remainingUSD": "example",
"spentUSD": "example"
}
}
],
"kind": "example",
"metadata": {
"continue": "example",
"remainingItemCount": 1,
"resourceVersion": "example",
"selfLink": "example",
"shardInfo": {
"selector": "example"
}
}
}

An error: a metav1.Status whose reason is a registered code.

Media type application/json

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
apiVersion
string
code
integer format: int32
details
object
causes
Array<object>
nullable
object
field
string
message
string
reason
string
group
string
kind
string
name
string
retryAfterSeconds
integer format: int32
uid
string
docs

Docs is the URL of the code’s docs page.

string
fix

Fix says what to do next, for example a CLI command or the field to change.

string
kind
string
message
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
reason
string
requestId

RequestID identifies the request in logs and support tickets.

string
status
string
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"
}