Kubernetes admission webhook enforcing a configurable cluster capacity budget for CPU/RAM.
877
A Kubernetes validating admission webhook that enforces a configurable cluster capacity budget for CPU and RAM — fail-closed by design.
Prevents cluster overcommit by tracking how much CPU and memory the scheduled workloads in a cluster have requested against a percentage budget of the cluster's total allocatable capacity. Any pod admission that would push a resource past its budget is rejected.
Kubernetes default scheduling only checks whether a pod fits on a node right now — it does not protect an operator-defined total headroom for the whole cluster. This webhook turns that headroom into a hard, auditable budget.
Three components, each with one job:
| Component | Role |
|---|---|
| Node Capacity Controller | Watches nodes, aggregates .status.allocatable into a ClusterCapacity CRD |
| Allocation Controller | Tracks pod resource requests, computes allocation %, holds the budget threshold |
| Admission Webhook | Reads allocation state, admits/denies pod CREATE + UPDATE against remaining budget |
failurePolicy: Fail.resources.requests. No soft limits, no heuristics.linux/amd64 + linux/arm64.docker pull aectann/emergency-ration-webhook:v0.1.0
Replace the image reference in deploy/deployment.yaml, apply the manifests, and configure the budget via the Allocation CRD. See the README for full installation instructions.
GitHub: https://github.com/AectannArd/emergency-ration-webhook
Apache-2.0
Content type
Image
Digest
sha256:76a7b6575…
Size
15.6 MB
Last updated
3 months ago
docker pull aectann/emergency-ration-webhook