Skip to content

Commit

Permalink
Update default TaskRun serviceAccountName
Browse files Browse the repository at this point in the history
Signed-off-by: snehajais22 <[email protected]>
  • Loading branch information
snehajais22 committed Aug 7, 2024
1 parent 6c59e63 commit 1fc54a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
} from './tasks';

const DefaultPipelineServiceAccountName = 'default:pipeline';
const DefaultTaskServiceAccountName = 'default';

/**
* Creates the properties for a `ClusterRoleBinding`
Expand Down Expand Up @@ -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<TaskRunParam>();
this._runWorkspaces = new Array<TaskRunWorkspace>();
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/taskbuilder.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/taskbuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!')
Expand Down

0 comments on commit 1fc54a3

Please sign in to comment.