Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-8077

Enforce CPU request caps for Pods/Deployments

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • openshift-4.19
    • workload
    • None
    • Product / Portfolio Work
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      1. 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.
      2. Provide error messages
      3. 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).

              gausingh@redhat.com Gaurav Singh
              rhn-support-rnandanw Rajesh Nandanwar
              None
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                None
                None