Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-4073

Requests/Limits are ignored for the first container

XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      CPU/Memory limits and requests,as set in the Devfile, are ignored for the FIRST container.

      For second (and subsequent) container are respected.

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

      Steps to Reproduce

      1. Create workspace out of following Devfile https://github.com/agiertli/demo-web-multi-container-resources/blob/main/devfile.yaml The issue is reproducible in Dev Sandbox

      Actual results:

      First container is setting requests/limits as this:

       

        - name: tools-limit-test
          container:
            image: registry.redhat.io/devspaces/udi-rhel8@sha256:ac5aaba0bbf1caa7f23205ab837e3029ff9f605211ebf38bdf4b9f1b8fb1ba83
            memoryLimit: 1Gi
            memoryRequest: 512Mi
            cpuRequest: 200m

      But it looks completely different on the cluster:

       

      On second (and subsequent) containers, they are set correctly

        - name: second-container
          container:
            memoryRequest: 513Mi
            memoryLimit: 1Gi
            cpuRequest: 105m

      See:

      The CPU Limit is set to 1 on this screenshot, but this is consequence of having a LimitRange inside the Dev Sandbox, so it's not an issue here.

      Expected results:

      CPU/Memory limits and requests are set correctly for every container defined in Devfile

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Dev Spaces 3.4

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

        1. ok-limits.png
          ok-limits.png
          106 kB
        2. wrong-limits.png
          wrong-limits.png
          106 kB
        3. missing-cpu-limit-warning.png
          missing-cpu-limit-warning.png
          173 kB

              ibuziuk@redhat.com Ilya Buziuk
              rhn-support-agiertli Anton Giertli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: