-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix taskrun not working with workspace having volumeClaimTemplate
This will move the auto name generation of workspace to happen after the pvc is created for volumeClaimTemplate and then name will be generated for workspace of volumeClaimTemplate type Added an example Fix #5537
- Loading branch information
1 parent
782e492
commit 9cf7590
Showing
2 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
examples/v1beta1/taskruns/workspace-with-volumeClaimTemplate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: task-with-workspace-run- | ||
spec: | ||
taskSpec: | ||
steps: | ||
- name: list-files | ||
image: ubuntu | ||
script: ls $(workspaces.read-allowed.path) | ||
workspaces: | ||
- name: read-allowed | ||
workspaces: | ||
- name: read-allowed | ||
volumeClaimTemplate: | ||
metadata: | ||
name: pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
volumeMode: Filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters