Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-3140

Resource limits and requests defined in Task stepTemplate are not applied to the related Pod's initContainers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Tekton Pipelines
    • None
    • Important
    • Customer Facing

      Description of problem:

      Resource limits and requests defined in Tekton Task .spec.stepTemplate are not applied to the related Pod's .spec.initContainers.

      The same issue was already opened as BugZilla here https://bugzilla.redhat.com/show_bug.cgi?id=1970493,  but never fixed.

      Prerequisites (if any, like setup, operators/versions):

      Reproduced in pipelines 1.10

      Steps to Reproduce

      1. Initiate the Task and TaskRun resources to reproduce the issue:

      oc apply -k https://github.com/gmeghnag/SRVKP-3140

       
      2. Verify that the resources.limits and resources.requests are not applied to initContainers (but to containers only):

      oc get po $(oc get taskrun hello-world-run -o jsonpath='{.status.podName}') -o json | jq '.spec | "initContainers.resources : " + (.initContainers[0].resources|tostring) + "\ncontainers.resources : " + (.containers[0].resources|tostring)' -r

      Actual results:

       

      initContainers.resources : {}
      containers.resources     : {"limits":{"cpu":"2","memory":"1Gi"},"requests":{"cpu":"1","memory":"1Gi"}}
      

       

      Expected results:

       

      initContainers.resources : {"limits":{"cpu":"2","memory":"1Gi"},"requests":{"cpu":"1","memory":"1Gi"}} 
      containers.resources     : {"limits":{"cpu":"2","memory":"1Gi"},"requests":{"cpu":"1","memory":"1Gi"}}
      

       

       
       

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

              jkandasa-rh Jeeva Kandasamy
              rhn-support-gmeghnag Gabriel Meghnagi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: