This resource is part of the v1alpha1 API and is subject to change. Fields and behavior may change in future releases.
Identity
| |
|---|
| Group | quota.miloapis.com |
| Version | v1alpha1 |
| Kind | AllowanceBucket |
| Scope | Project |
Overview
An AllowanceBucket aggregates quota capacity and consumption for a single (consumer, resource type) pair. The quota system creates one bucket automatically for each unique combination found in active ResourceGrant resources, then continuously tallies the total granted capacity (limit) against the amount consumed by granted ResourceClaim resources (allocated) to compute what remains (available).
You typically do not create buckets by hand — they are system-managed and read-mostly. You use them to see how much quota a consumer has, how much is in use, and how much is left, which drives real-time admission decisions when new ResourceClaim resources are created.
Spec fields
| Field | Type | Required | Description |
|---|
spec.consumerRef | Object | Yes | Identifies the quota consumer this bucket tracks. Must match the consumer on the ResourceGrant resources that contribute to the bucket. |
spec.consumerRef.kind | string | Yes | Type of consumer resource, e.g. Organization, Project, or User. |
spec.consumerRef.name | string | Yes | Name of the specific consumer instance, e.g. acme-corp. |
spec.consumerRef.apiGroup | string | No | API group of the consumer resource, e.g. resourcemanager.miloapis.com. |
spec.consumerRef.namespace | string | No | Namespace of the consumer resource; required for Project-scoped consumers, left empty for Organization-scoped consumers. |
spec.resourceType | string | Yes | The resource type this bucket aggregates quota for. Must match a registered ResourceRegistration resource type, e.g. resourcemanager.miloapis.com/projects. |
Status fields (read-only)
| Field | Type | Description |
|---|
status.limit | integer | Total quota capacity for this (consumer, resource type), summed from all active contributing ResourceGrant resources. |
status.allocated | integer | Total quota currently consumed by granted ResourceClaim resources. |
status.available | integer | Remaining capacity, computed as limit - allocated (never negative); drives admission decisions. |
status.claimCount | integer | Number of granted ResourceClaim resources consuming from this bucket. |
status.grantCount | integer | Number of active ResourceGrant resources contributing to this bucket’s limit. |
status.contributingGrantRefs | []Object | Per-grant detail (name, amount, lastObservedGeneration) for each ResourceGrant that contributes capacity. |
status.lastReconciliation | string | Timestamp of the last recalculation; indicates how fresh the aggregated data is. |
status.observedGeneration | integer | Most recent spec generation the quota system has processed. |
Usage
Buckets are normally created automatically, but the spec is small enough to inspect or reproduce directly:
apiVersion: quota.miloapis.com/v1alpha1
kind: AllowanceBucket
metadata:
name: acme-corp-projects
spec:
consumerRef:
apiGroup: resourcemanager.miloapis.com
kind: Organization
name: acme-corp
resourceType: resourcemanager.miloapis.com/projects
datumctl apply -f allowancebucket.yaml --project my-project
datumctl get allowancebuckets --project my-project
datumctl describe allowancebuckets acme-corp-projects --project my-project
Run datumctl explain allowancebuckets --recursive to see the full, live field tree for this resource.