diff --git a/src/builders.ts b/src/builders.ts index 7508c75..4d67de9 100644 --- a/src/builders.ts +++ b/src/builders.ts @@ -34,6 +34,7 @@ import { } from './tasks'; const DefaultPipelineServiceAccountName = 'default:pipeline'; +const DefaultTaskServiceAccountName = 'default'; /** * Creates the properties for a `ClusterRoleBinding` @@ -1009,7 +1010,7 @@ export class TaskRunBuilder { this._scope = scope; this._id = id; this._task = task; - this._sa = DefaultPipelineServiceAccountName; + this._sa = DefaultTaskServiceAccountName; this._crbProps = DefaultClusterRoleBindingProps; this._runParams = new Array(); this._runWorkspaces = new Array(); diff --git a/test/__snapshots__/taskbuilder.test.ts.snap b/test/__snapshots__/taskbuilder.test.ts.snap index e3c5140..60fb6b9 100644 --- a/test/__snapshots__/taskbuilder.test.ts.snap +++ b/test/__snapshots__/taskbuilder.test.ts.snap @@ -70,7 +70,7 @@ echo $(params.input)", "value": "Hello World!", }, ], - "serviceAccountName": "default:default", + "serviceAccountName": "default", "taskRef": { "name": "echo-input", }, @@ -379,7 +379,7 @@ echo $(params.input)", "value": "Hello World!", }, ], - "serviceAccountName": "default:pipeline", + "serviceAccountName": "default", "taskRef": { "name": "echo-input", }, @@ -407,7 +407,7 @@ exports[`TaskBuilderTest TaskRunResolver 1`] = ` }, "spec": { "params": [], - "serviceAccountName": "default:pipeline", + "serviceAccountName": "default", "taskRef": { "params": [ { diff --git a/test/taskbuilder.test.ts b/test/taskbuilder.test.ts index 03ca263..0e29fa8 100644 --- a/test/taskbuilder.test.ts +++ b/test/taskbuilder.test.ts @@ -237,7 +237,7 @@ class TestCustomTaskRunBuilder extends Chart { 'default', 'default'); - const serviceAccount = 'default:default'; + const serviceAccount = 'default'; new TaskRunBuilder(this, 'echo-input-run', myTask) .withRunParam('input', 'Hello World!')