Version and Operating System
tkn Version: 0.9.0
Operating System: Tekton Pipeline v0.12.1
Expected Behavior
volumeClaimTemplates in Pipelines v0.12.1 are a nice way to start PipelineRuns with a dynamically generated PersistentVolumeClaim (PVC). See here for a sample in the main code base. The tkn docs list several options when using tkn pipeline start to specify workspace settings, but they do not include support for volumeClaimTemplates.
Without this support, Tekton v1beta1 pipelines using workspaces and no PipelineResources are easier to start using kubectl create [PipelineResource] than tkn pipeline start, because volumeClaimTemplates are so extremely useful. They are however rather verbose:
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: run-with-template-
spec:
pipelineRef:
name: cat-pipeline-readme
workspaces:
- name: shared-workspace
volumeClaimTemplate:
metadata:
name: mypvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
Almost all of this is boilerplate that could be auto-generated. If tkn wanted to pick a default storage size then we could
tkn pipeline start [name] --workspace name=[name],volumeClaimTemplate=true
If we did not want to go that far, maybe
tkn pipeline start [name] --workspace name=[ws],volumeClaimTemplate=name=myPrefix,size=50Mi
Flattening the volumeClaimTemplate into comma separated values in a usable way seems like the hardest part of the problem.
Actual Behavior
--workspace does not support volumeClaimTemplates as of tkn v0.9.
Steps to Reproduce the Problem
- Attempt to turn this into
tkn syntax
- Notice it's not possible
Additional Info
Version and Operating System
tkn Version: 0.9.0
Operating System: Tekton Pipeline v0.12.1
Expected Behavior
volumeClaimTemplates in Pipelines v0.12.1 are a nice way to start PipelineRuns with a dynamically generated PersistentVolumeClaim (PVC). See here for a sample in the main code base. The tkn docs list several options when using
tkn pipeline startto specify workspace settings, but they do not include support for volumeClaimTemplates.Without this support, Tekton v1beta1 pipelines using workspaces and no PipelineResources are easier to start using
kubectl create [PipelineResource]thantkn pipeline start, because volumeClaimTemplates are so extremely useful. They are however rather verbose:Almost all of this is boilerplate that could be auto-generated. If
tknwanted to pick a default storage size then we couldIf we did not want to go that far, maybe
Flattening the volumeClaimTemplate into comma separated values in a usable way seems like the hardest part of the problem.
Actual Behavior
--workspacedoes not supportvolumeClaimTemplatesas of tkn v0.9.Steps to Reproduce the Problem
tkn syntaxAdditional Info