Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to define the PVC type when a task declare to use it? #1629

Closed
zhangtbj opened this issue Nov 27, 2019 · 4 comments
Closed

Where to define the PVC type when a task declare to use it? #1629

zhangtbj opened this issue Nov 27, 2019 · 4 comments
Labels
kind/question Issues or PRs that are questions around the project or a particular feature

Comments

@zhangtbj
Copy link
Contributor

Expected Behavior

The public cloud provider may provide many PVC types, such as standard or GLACIER, etc..... but just only one.
I can choose which PVC type I use.

Actual Behavior

But in the current tekton taskrun config:

spec:
  inputs:
    params:
    - name: text
      value: how to ci/cd?
    resources:
    - name: repo
      resourceRef:
        name: repo
  outputs:
    resources:
    - name: repo
      paths:
      - /pvc/pipeline-task-1/repo

It only config the paths, and it used a storage class type which is not good for me.

Is there any way that I can choose which storage class type I used for the task output?

The wrong storage class makes my task fail because PVC is pending ....

Thanks!

@zhangtbj zhangtbj changed the title Where to define the PVC type when a task declare that Where to define the PVC type when a task declare to use it? Nov 27, 2019
@vdemeester
Copy link
Member

@zhangtbj thanks for the issue. There is no way as of today, but #1438 might help to tackle that (and later on the new design of PipelineResource should build on top of #1438)

/kind question

@tekton-robot tekton-robot added the kind/question Issues or PRs that are questions around the project or a particular feature label Nov 27, 2019
@bobcatfish
Copy link
Collaborator

Hey @zhangtbj - do you mean the PVC that is used for passing data from the output of one task to the input of another? If so you actually can configure the underlying PVC's storage class via configmap, you can see an example of what this could look like in this configmap yaml.

@zhangtbj
Copy link
Contributor Author

Hi @bobcatfish ,

Actually, it is not a new requirement. It is because I got two failures when I ran the Tekton integration tests:
TestDAGPipelineRun and TestDAGPipelineRun test:

When I debug the taskrun pod, I found the task fail because the PVC is pending.

And the default PVC which taskrun used on my cloud is full. So that I cannot pass my tests.

And from the taskrun:

spec:
  inputs:
    params:
    - name: text
      value: how to ci/cd?
    resources:
    - name: repo
      resourceRef:
        name: repo
  outputs:
    resources:
    - name: repo
      paths:
      - /pvc/pipeline-task-1/repo

I didn't found where to configure the PVC (storage type). That is why I opened this issue.

Thanks!

@ghost
Copy link

ghost commented Apr 9, 2020

It sounds like this info has resolved the problem, just to reiterate before I close:

The storageClassName field in the configmap @bobcatfish linked allows this to be configured.

Our docs on this are here: https://github.com/tektoncd/pipeline/blob/master/docs/install.md#configuring-a-persistent-volume

You can also, alternatively, configure a default storage class in your cluster.

I'm going to close this issue. If the storageClassName and default storage class configuration are not enough please let us know why and reopen the issue. Many thanks!

@ghost ghost closed this as completed Apr 9, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Issues or PRs that are questions around the project or a particular feature
Projects
None yet
Development

No branches or pull requests

4 participants