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

Pipelines don't work with resource quota

XMLWordPrintable

    • 5
    • False
    • False
    • Pipelines Sprint 214

      Expected behavior

      Pipelines work fine when a resource quota is defined in a namespace

      Actual behavior

      Pipeline run fails with a message similar to this:

      failed to create task run pod "hello-pipeline-57sljr-hello-4m8rj": pods "hello-pipeline-57sljr-hello-4m8rj-pod-shbrn" is forbidden: failed quota: pods-low: must specify cpu. Maybe invalid TaskSpec

      Steps to reproduce

      1. create a new namespace
      2. create a resource quota
      3. create a pipeline and pipeline run

      kind: ResourceQuota
      apiVersion: v1
      metadata:
        name: pods-low
        namespace: quotatest
      spec:
        hard:
          cpu: '1'
          pods: '1'
        scopeSelector:
          matchExpressions:
            - scopeName: Terminating
              operator: Exists
      
      apiVersion: tekton.dev/v1beta1
      kind: Pipeline
      metadata:
        name: hello-pipeline
      spec:
        tasks:
        - name: hello
          taskSpec:
            results:
            - name: greeting
            steps:
            - name: greet
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                set -e
                echo -n "Hello World!" | tee $(results.greeting.path)
              resources:
                requests:
                  cpu: "100m"
                  memory: "128Mi"
                limits:
                  memory: "128Mi"
                  cpu: "200m"
      ...
      

              Unassigned Unassigned
              ppitonak Pavol Pitoňák
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: