Skip to content

Tekton Creates PVC unnecessarily if volumes are defined #937

@mustafaakin

Description

@mustafaakin

Expected Behavior

I have task with no inputs or outputs. It should not have any PVCs.

Actual Behavior

But a PVC is created if the Task spec has volumes in it.

Steps to Reproduce the Problem

apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: msg
spec:
  steps:
  - name: msg
    image: alpine
    command:
    - echo
    args:
    - slm
  volumes: []
---
apiVersion: tekton.dev/v1alpha1
kind: Pipeline
metadata:
  name: demo-pipeline
spec:
  tasks:
  - name: test-1
    taskRef:
      name: msg
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
  name: tst-run
spec:
  pipelineRef:
    name: demo-pipeline
$  kubectl apply -f test-1.yaml
task.tekton.dev/msg created
pipeline.tekton.dev/demo-pipeline created
pipelinerun.tekton.dev/tst-run created
$ kubectl get pvc
NAME          STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
tst-run-pvc   Pending                                      standard       2s

Additional Info

tekton 0.4

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions