pipeline
pipeline copied to clipboard
Provide a default emptyDir volume for TaskRuns
Feature request
Today, users generally declare workspaces for sharing data between Steps in a TaskRun. Tekton provides some implicit volume mounts that users are probably unaware of due to lack of documentation or against best practices. One such implicit mount is /tekton/home which is an emptyDir. Tekton does not use it for sharing any internal state between Tasks. It is there and most likely unused.
On behalf of the Data Interfaces WG: the request is to provide a variable replacement syntax (e.g. $(tekton.shared)) to the mount path of this emptyDir volume and document the use of this variable for our users.
- This will make composing
Taskrunsfor simple use cases easier (particularly now withStepActions).- e.g. a
Taskthat doesgit-clone,image build and pushwould not need to declare aWorkspaceto share data between the twoSteps. - Not having to provide
Workspacesto aTaskmakes theTaskRunless dependent onkubernetisms.
- e.g. a
- Overall, it reduces the barrier to adoption for simple workflows when users new to Tekton and Kubernetes.
cc @wlynch @vdemeester @afrittoli
Note that there is a "configuration" for default TaskRun workspace binding, see https://github.com/tektoncd/pipeline/blob/main/config/config-defaults.yaml#L75 πΌπΌ π . With this, it's very simple to support the use case of a single TaskRun with StepAction that does clone+build+β¦ in on go, without having to worry on bounding the workspace.
Ah! That's a good point. Does not require any changes in the controller.