Skip to content

Commit

Permalink
Also document volumeClaimTemplate for TaskRun
Browse files Browse the repository at this point in the history
The volumeClaimTemplate workspace is only documented for PipelineRun.

This commit adds documentation of volumeClaimTemplate also for TaskRun.
  • Loading branch information
jlpettersson authored and tekton-robot committed Apr 28, 2020
1 parent b435bd9 commit a7a4c5d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Tekton Pipelines are **Typed**:
- Jump in with [the tutorial!](docs/tutorial.md)
- Take a look at our [roadmap](roadmap.md)

*Note that starting from the 0.11 release of Tetkon, you need to have
*Note that starting from the 0.11 release of Tekton, you need to have
a cluster with **Kubernetes version 1.15 or later***.

### Read the docs
Expand Down
14 changes: 14 additions & 0 deletions docs/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,20 @@ The entry must also include one `VolumeSource`. See [Using `VolumeSources` with
The following examples illustrate how to specify `Workspaces` in your `TaskRun` definition.
For a more in-depth example, see [`Workspaces` in a `TaskRun`](../examples/v1beta1/taskruns/workspace.yaml).

In the example below, a template is provided for how a `PersistentVolumeClaim` should be created for a Task's workspace named `myworkspace`. When using `volumeClaimTemplate` a new `PersistentVolumeClaim` is created for each `TaskRun` and it allows the user to specify e.g. size and StorageClass for the volume.

```yaml
workspaces:
- name: myworkspace
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```

In the example below, an existing `PersistentVolumeClaim` called `mypvc` is used for a Task's `workspace`
called `myworkspace`. It exposes only the subdirectory `my-subdir` from that `PersistentVolumeClaim`:

Expand Down

0 comments on commit a7a4c5d

Please sign in to comment.