Kubernetes check
Namespace has no ResourceQuota or LimitRange
Trigger condition
A successful list of both ResourceQuota and LimitRange confirms zero objects of either kind exist in an audited namespace. Either object satisfies this presence check -- a namespace with only a ResourceQuota, only a LimitRange, or both is never flagged. Objects in other namespaces do not count. Applies identically to empty and system namespaces within the audit scope. Each list's availability is tracked independently: if the available list already shows an object in a namespace, presence is satisfied there regardless of the other list's own availability; if the available list shows none and the other list is unavailable (e.g. a 403), that namespace's absence is indeterminate and no finding is produced for it.
Evidence
States the namespace's name and that it has no ResourceQuota or LimitRange objects.
Impact
A ResourceQuota can cap aggregate resource usage or object counts across a namespace; a LimitRange can set defaults or enforce per-object constraints on applicable objects. This finding measures object presence only: a single qualifying object of either kind satisfies it, even one that does not actually provide the CPU, memory, or other controls a namespace's workloads may need.
Recommendation
Choose a ResourceQuota, a LimitRange, or both based on the workload's actual needs. Review current requests, limits, and scaling headroom before setting values, and test admission behavior (e.g. in a non-production namespace first) before rolling out either control, since an overly strict quota or limit can block legitimate Pod creation or updates. See the ResourceQuota documentation (https://kubernetes.io/docs/concepts/policy/resource-quotas/) and the LimitRange documentation (https://kubernetes.io/docs/concepts/policy/limit-range/).
Important limitations
This check only evaluates whether at least one ResourceQuota or LimitRange object exists in a namespace -- it never inspects either object's own spec, so an object that does not actually cap or default anything relevant still satisfies this check. If ResourceQuota data is unavailable (e.g. a 403) and the available LimitRange list shows nothing for a namespace (or vice versa), that namespace's absence is indeterminate and this check is skipped for it rather than reporting it as unprotected.