Skip to content

Commit

Permalink
Only make a PVC for a PipelineRun if we need to. 🗑️
Browse files Browse the repository at this point in the history
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 #1007 and
then subsequently rolled back in #1071. I
*think* this one gets the logic correct :)

Co-authored-by: Christie Wilson <bobcatfish@gmail.com>
Fixes: #937
  • Loading branch information
2 people authored and tekton-robot committed Nov 12, 2019
1 parent 748c969 commit ffadda1
Show file tree
Hide file tree
Showing 9 changed files with 362 additions and 80 deletions.
7 changes: 7 additions & 0 deletions pkg/apis/pipeline/v1alpha1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ import (
// additional metatdata should be provided for it.
type PipelineResourceType string

var (
AllowedOutputResources = map[PipelineResourceType]bool{
PipelineResourceTypeStorage: true,
PipelineResourceTypeGit: true,
}
)

const (
// PipelineResourceTypeGit indicates that this source is a GitHub repo.
PipelineResourceTypeGit PipelineResourceType = "git"
Expand Down
Loading

0 comments on commit ffadda1

Please sign in to comment.