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

It's possible to create a pipelinerun with non-existing field serviceAccountNames

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Blocker
    • Pipelines 1.9.0
    • Pipelines 1.9.0
    • Tekton Pipelines
    • None
    • 3
    • False
    • None
    • False
    • Pipelines Sprint 228

    Description

      Description of problem:

      Pre-1.8 it was possible to use specify serviceAccountNames in pipelinerun.

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

      Pipelines 1.9.0

      Steps to Reproduce

      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: sa-for-task2
      ---
      apiVersion: tekton.dev/v1beta1
      kind: Pipeline
      metadata:
        name: hello-pipeline
      spec:
        tasks:
        - name: task1
          taskSpec:
            steps:
            - name: hello
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                echo "Hello from task 1"
        - name: task2
          taskSpec:
            steps:
            - name: hello
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                echo "Hello from task 2"
      ---
      apiVersion: tekton.dev/v1beta1
      kind: PipelineRun
      metadata:
        generateName: hello-pipeline-
      spec:
        pipelineRef:
          name: hello-pipeline
        serviceAccountName: pipeline
        serviceAccountNames:
          - taskName: task2
            serviceAccountName: sa-for-task2
        timeout: 2m
      

      Actual results:

      It's possible to create pipeline run but it never does anything useful

      $ tkn pr ls
      NAME                   STARTED       DURATION   STATUS
      hello-pipeline-2xqv2   ---           ---        ---
      

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Build Details:

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

      It's a side-effect of fixing https://issues.redhat.com/browse/SRVKP-2516

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: