What is the nature and description of the request?
- Users can specify resources.requests in Pod/Deployment specs.
apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: app image: images.my-company.example/app:v4 resources: requests: <----- memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m"
- `LimitRange` only supplies defaults and min/max. It cannot prohibit users from setting requests within min/max.
Requirement:
- Enforce a fixed CPU request value for containers by either:
- deny Pod/Deployment creation/update when any container's resources.requests exceeds a configured cap (e.g., 500m or 1 CPU), or
- reject Pods that explicitly set request, or
- use a approved requests value (e.g., 500m) into Pod specs.
- Provide error messages
- not require changing existing `LimitRange` defaults/limits.
Why does the customer need this? (business requirements)
- Prevent resource inefficient usage. Currently, requested CPU values are uncontrolled, increasing operational costs.
- Capping requests will prevent single deployments from taking over resources and impacting other resources.
- restrict CPU resource requests in Pod/Deployment specs so that users cannot set arbitrary requests
- ensure container CPU requests are either forced to an allowed fixed value (example: 250m or 500m) or blocked if they exceed a permitted cap (example: 500m or 1 CPU).