Skip to content

Instantly share code, notes, and snippets.

@pritidesai
Created January 21, 2020 21:37
Show Gist options
  • Save pritidesai/9c471db3a026ec29430e06ce7094267e to your computer and use it in GitHub Desktop.
Save pritidesai/9c471db3a026ec29430e06ce7094267e to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
resources:
requests:
storage: 5Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: custom-volume-taskrun
spec:
workspaces:
- name: custom
persistentVolumeClaim:
claimName: my-pvc
subPath: my-subdir
taskSpec:
steps:
- name: write
image: ubuntu
script: echo $(workspaces.custom.volume) > $(workspaces.custom.path)/foo
- name: read
image: ubuntu
script: cat $(workspaces.custom.path)/foo | grep $(workspaces.custom.volume)
workspaces:
- name: custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment