Skip to content

Commit 877086c

Browse files
dlorencbobcatfish
andcommitted
Only make a PVC for a PipelineRun if we need to. 🗑️
We only need to make a PVC if a Pipeline contains tasks that declare Output resources of the allowed types. This PR changges our detection to only create a PVC under those conditions. This was originally attempted in tektoncd#1007 and then subsequently rolled back in tektoncd#1071. I *think* this one gets the logic correct :) Co-authored-by: Christie Wilson <[email protected]> Fixes: tektoncd#937
1 parent 6d2fbac commit 877086c

File tree

9 files changed

+362
-80
lines changed

9 files changed

+362
-80
lines changed

pkg/apis/pipeline/v1alpha1/resource_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ import (
3030
// additional metatdata should be provided for it.
3131
type PipelineResourceType string
3232

33+
var (
34+
AllowedOutputResources = map[PipelineResourceType]bool{
35+
PipelineResourceTypeStorage: true,
36+
PipelineResourceTypeGit: true,
37+
}
38+
)
39+
3340
const (
3441
// PipelineResourceTypeGit indicates that this source is a GitHub repo.
3542
PipelineResourceTypeGit PipelineResourceType = "git"

0 commit comments

Comments
 (0)