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

Binary (local) input type #924

Open
markusthoemmes opened this issue May 29, 2019 · 11 comments
Open

Binary (local) input type #924

markusthoemmes opened this issue May 29, 2019 · 11 comments
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/question Issues or PRs that are questions around the project or a particular feature lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@markusthoemmes
Copy link

Openshift builds have a really neat concept of Binary (local) sources. Essentially, it gives you an API to stream binary contents into a build from anywhere (including the local file system).

This opens the door for nice FaaS-style user-experiences, where the user might want to do something like cli create my-large-packaged-nodejs-function.zip, then expect this to be build into a container image and ultimately that image then being pushed to run somewhere (for example Knative Serving).

This flow would be possibly without requiring the user to push this code somewhere and without the user having to install software to build and manage images.

Would that be something that Tekton could support?

@vdemeester vdemeester added the kind/question Issues or PRs that are questions around the project or a particular feature label May 29, 2019
@bobcatfish
Copy link
Collaborator

This flow would be possibly without requiring the user to push this code somewhere and without the user having to install software to build and manage images.

@markusthoemmes could you give a bit more detail about what exactly this would look like from a user perspective? I'm just trying to wrap my head around where the data would actually be coming from.

Since Tekton Tasks currently execute on a k8s node, would data from "the local filesystem" be data from the disk on the node, or would it be data from the user's machine, which would be uploaded to the node? If it's the later case then it sounds to me like the key to addressing this might be to tackle #235 (but maybe im misunderstanding!)

@vdemeester
Copy link
Member

@bobcatfish I think the initial use-case @markusthoemmes is aiming for is some FAAS-like behavior where you could, as an example, send your code directly to a Pipeline that will, once succeeded, deploy on Knative, without having to rely on any source-code management like a git repository or else.

This is a bit related to tektoncd/cli#53.

This is useful for when a user would like to upload a directory without requiring access to a new data plane (e.g., GCP's Cloud Storage).

@bobcatfish
Copy link
Collaborator

Hm okay I think this is making a bit more sense @vdemeester ! So would this be a use case where a user is manually creating PipelineRuns and/or TaskRuns? (cuz if there was some other mechanism invovled, e.g. the CLI, then that mechanism could take care of uploading the source wherever i needs to go)

Or is this more about making it possible to actually store that data somewhere - e.g. ephemerally in the k8s cluster - without requiring some external storage like a git repo or a storage bucket?

@vdemeester
Copy link
Member

So would this be a use case where a user is manually creating PipelineRuns and/or TaskRuns? (cuz if there was some other mechanism invovled, e.g. the CLI, then that mechanism could take care of uploading the source wherever i needs to go)

Or is this more about making it possible to actually store that data somewhere - e.g. ephemerally in the k8s cluster - without requiring some external storage like a git repo or a storage bucket?

So, the cli (or a cli) would take care of uploading the source to wherever it needs to go indeed. But yeah, this would be about making the data stored ephemerally in the cluster. Could be a volume, or whatever, and this would/could be referenced as an input resource (of type storage, git or whatever 👼) so that you could use it as an input to a Task or Pipeline 👼.

A side effect would be to run easily tekton pipelines locally without having to share anything with the k8s cluster (aka HostVolume, …) — but this is definitely not the primary use case targeted here.

@bobcatfish bobcatfish added design This task is about creating and discussing a design kind/design Categorizes issue or PR as related to design. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 14, 2019
@abayer
Copy link
Contributor

abayer commented Jul 9, 2019

So I was about to create an issue for adding a volume resource type - we've got a use case where we've got one pipeline that clones a git repo, makes some changes or adds new files, generates a new pipeline to actually build/test the repo, and then runs that pipeline. Basically, what we want is to be able to reuse the workspace volume from the first PipelineRun in the second PipelineRun. So I'm wondering whether I should just pursue the idea of volume resources or try to go more general and address this?

@abayer
Copy link
Contributor

abayer commented Jul 10, 2019

After thinking about this for a while and starting an experimental prototype of a volume resource type, I think it makes sense to tackle that on its own. Opening an issue for that.

@cmoulliard
Copy link

Your idea is correct @abayer. We need to mount a volume to the tekton's pod created to let a tool such as oc, odo, kubectl, ... to push as binary the code of the project to be built. This is what we did with the project odo or our operator halkyon using the concept of supervisord init container

@tekton-robot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 12, 2020
@zhangtbj
Copy link
Contributor

zhangtbj commented Nov 3, 2020

Hi @cmoulliard or @markusthoemmes ,

I am not sure do you have any update about this issue?

We also have this kind of requirement that we want to upload some local folder to a Tekton task to build the related container image.

Is there a new InputResource for that or any new solution for that?

Your idea is correct @abayer. We need to mount a volume to the tekton's pod created to let a tool such as oc, odo, kubectl, ... to push as binary the code of the project to be built. This is what we did with the project odo or our operator halkyon using the concept of supervisord init container

Or can we know how to do about the the project odo above ^^

Thanks!

@markusthoemmes
Copy link
Author

/remove-lifecycle rotten

@tekton-robot tekton-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 18, 2020
@vdemeester
Copy link
Member

/lifecycle frozen

@tekton-robot tekton-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/question Issues or PRs that are questions around the project or a particular feature lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
Status: Todo
Development

No branches or pull requests

7 participants