-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Resources, PVCs and Chaining #1076
Comments
OK, time for some suggestions! Here's what we think we need to start fixing:
Question:
This will probably be breaking, needs to be done across a few releases |
@dlorenc #1087 seems like it may be germane. I opted to go with a new volume resource rather than adding it as an implementation of the storage resource, but we could definitely go down that road. The one thing I'd note in re: getting rid of chain-copying with this is that we'd need to have an option to not delete the PVC at the end of the run, at least to fit the JX use case for the volume resource as proposed. |
Thanks for the explanation @abayer! So to be clear, the Volume resource would persist, but the Storage one would get deleted transparently? |
In the PR, the new |
The cluster type currently has no defined behavior as output resources, and the git type behaves incorrectly. The new Volume type should be used instead for the use-cases supported by the old Git resource. This is part of the large cleanup in tektoncd#1076, and should not be submitted until after tektoncd#1087.
Thanks for the nice write-up, it's really helpful! In general it makes sense to me; I wonder if we need to restrict the output of and input resource / input of a an output resource to a filesystem. |
I'm not sure I understand, can you explain a bit more? Basically disallow things to push to outside services directly from inside a Task? |
Heh, sorry, I was trying to say something simple in a very convoluted way :P I was commenting on this point you made:
Do we need to restrict us to a "filesystem injected into a Tekton Task" or can we say that resource in general should represent reconciliation between a system in the outside world and a resource made available to a Tekton Task? Resource could be an environment variable or a combination of stream in/stream out endpoints? |
TODO for next release: break this down into component issues, esp. since this will probably span releases. |
In tektoncd#1109 we will be removing support for git as an output. In the current implementation, git as an output is just a volume that holds the data from the git repo, and copies it between Tasks (when git as an output is linked to git as an input). As discussed in tektoncd#1076, the model we want for PipelineResources is for them to take the outside world and represent it on disk when used as an input, and when used as an output, to update the outside world. In order to do this, what we actually want for a git output is for it to create a commit the repo it is referencing. However up until this point folks have been using git resources in the way that we want Volume Resources to behave tektoncd#1062, so we want to transition folks to Volume Resources and away from using git outputs. Fixes tektoncd#1283
Latest design from @sbwsg to address confusion and bugs by re-designing PipelineResources: https://docs.google.com/document/d/1euQ_gDTe_dQcVeX4oypODGIQCAkUaMYQH5h7SaeFs44/edit# |
Closing this in favor of #1673 |
In the debugging of #937 and the subsequent rollback of our failed fix attempt in #1068, @bobcatfish and I did a bit of a deep dive into the current state of the Resource code to try to understand the current behavior and decide on the right fix.
We have some ideas on what we'd like to do to fix the issue, but I want to open this up early to track our initial findings and open up the conversation on next steps.
Current State
Tekton Pipeline provides several mechanisms for passing artifacts between Tasks within the same pipeline. This doesn't have a formal name in the Tekton architecture, but the logic is mostly encapsulated in the ArtifactStorageInterface.
Two implementations exist for this interface today:
The artifacts that can be stored in this system are produced by the OutputResource system. Two types of resources can be used today: Storage and Git.
Additionally, this system is only used when a Task is bound to a Pipeline.
Before a PipelineRun is started, the artifact storage system is initialized, whether or not it is actually needed.
When each task runs that contains an output resource of one of the supported types, a PVC claim is injected into the pod along with Steps to copy/make the resources available inside the Task containers.
Problems
This existing system has a few problems:
Most of our resources work this way today:
There are however, a few exceptions:
Christie and I talked through some ideas on how to fix this, and I'll write these up next.
The text was updated successfully, but these errors were encountered: