class ResourcePreset
Reads the +app.kubernetes.io/size+ label from pod-bearing resources and injects CPU/memory requests and limits into every container.
The label on the resource is the input:
Kube::Cluster["Deployment"].new {
metadata.labels = "app.kubernetes.io/size": "small"
...
}
Register in the stack — no arguments needed:
stack do use Middleware::ResourcePreset end
Available sizes: nano, micro, small, medium, large, xlarge, 2xlarge. Limits are ~1.5x requests (following Bitnami conventions).