Skip to content

serviceAccountName field is not allowed for tekton.dev/v1 pipelinerun #7383

@lwabish

Description

@lwabish

Expected Behavior

According to the docs, pipelinerun can specify a serviceaccount. specifying-custom-serviceaccount-credentials

Actual Behavior

apiVersion tekton.dev/v1 fails to specify serviceAccountName field because webhook refuses it.

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: pipelinerun
spec:
  serviceAccountName: "admin"

admission webhook "webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "serviceAccountName"

tekton.dev/v1beta1 work fine.

Steps to Reproduce the Problem

  1. add serviceAccountName: "admin" field for a pipelinerun of apiVersion tekton.dev/v1
  2. kubectl apply the pipelinerun
  3. webhook will refuse the yaml creating

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.8", GitCommit:"fdc77503e954d1ee641c0e350481f7528e8d068b", GitTreeState:"clean", BuildDate:"2022-11-09T13:38:19Z", GoVersion:"go1.18.8", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.10+rke2r1", GitCommit:"5c1d2d4295f9b4eb12bfbf6429fdf989f2ca8a02", GitTreeState:"clean", BuildDate:"2023-01-19T17:41:09Z", GoVersion:"go1.19.5 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

v0.50.3

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions