-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add EP on enabling local source code support #717
Add EP on enabling local source code support #717
Conversation
e6f7780
to
0d1c2d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just learnt about Mink approach, interesteting that we can easily bundle up local data, and upload as a layer in a container registry. Defintely something to keep in mind for later use!
However, for the local source-code upload feature, I think we should further explore the same approach that Tekton relies on. At least the following aspects of it:
- A mechanism that can be secluded inside the cluster, preferably a ephemeral type of location, so right after the build is done the data would be wiped out. Here use cases like intellectual-property limitations would benefit of, plus avoid using the container-registry as a intermediary storage;
- A drop-in-replacement for
PipelineResource
, on which we are able to upload local data before the Build-Strategy's build take place;
Some time ago, we had input from @rhuss (issue #97 comment) on how to upload data before a given build starts, I think we should take this in consideration again.
We did some investigations and solution comparison before. There are some reasons we choose Mink instead of other solutions:
After lots of comparison, we think container registry (Mink) way is better than others. |
Indeed, we have the track record in issue #97.
I think we should also take in consideration that users/companies might not want (or are able to) store their source-code outside of VCS systems (like GitHub). Additionally, should we expose the container registry to arbitrary user uploads? During the development workflow the users might need to upload their data too often, ending up consuming too much space.
Tekton can support Kubernetes volumes directly. I think we should explore having users data in a typical Kubernetes volume, so we can work with settings like
Aligned with my initial comment, certain ecosystems are design to only explose compiled artifacts. In this case we would be exposing the actual source-code as well. Also, by using a Kubernetes abstraction like
I think it's early to claim better performance if we haven't make a cohesive profiling of both designs. As far as I can recall, I haven't seen such data to be able to conclude the registry upload would be simply faster, please correct me if we had such profiling. Furthermore, there are several flavours of container-registries so the performance (and reliability) can vary wildely. We should discuss the performance implications, I would like to understand why it's being taken as a decision factor so early in the process.
Thanks for bringing Mink on the radar. My arguments here are focused on the storage layer proposed. |
Yep, I am thinking if we can choose different storages for local source code, like registry or volume.
Yep, we should support different types and we can support step by step. When I talking about the performance, it is related the Kubernetes system performance, not the build or upload performance. If there are many kube api long connections, which may make the kube system or master slower. |
91420d6
to
08969e6
Compare
@otaviof I added you as an approver of this EP, thanks for your feedback. One important comment is that this bundle approach will not constrain us on other mechanism to support local source code. In other words, we can have multiple flavors of what you call "the storage layer", where bundles is only one. If you see value in a secluded mechanism inside the cluster, we can always provide an EP for it. This EP is just about using container images as a way to store source code, in order to make it available later at runtime, on our generated pods. As far as I know, Tekton does not have a way to support local source code, and this proposal is probably the less invasive one to achieve that, in terms of API changes. Regarding your concerns on:
Similar to what @imjasonh mentioned, this is definitely a concern but we can have clean-up routines for it. Which can be configurable depending on the user selection.
Similar to what @rhuss mentioned, this might be useful for us in the future. At the moment we do not have any story that involves mounting volumes. This EP does not block us from doing that, so I think its fine to move on, as long as we consider this.
As @zhangtbj mentioned there are many ways to achieve this feature, e.g. streaming the source code via a port-forward ( security concerns ), mounting source code in configmaps ( they have size limits ). I´m not saying they are not ideal, but all different options will have pros and cons. This EP proposes to rely on pushing/pulling to a container registry, should we restrict ourselves from this feature because of performance concerns? I dont think so. I think we should be aware on that we have room for optimizing the bundles approach, but we should do this in the implementation and further development cycles. |
Do we have a GitHub issue tracking the development of this feature? |
@sbose78 no, but see shipwright-io/community#15 (comment) |
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings. Add `github.com/google/go-containerregistry`. Add `github.com/schollz/progressbar/v3`.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Reference shipwright-io/build#717 Add `bundle` package that contains convenience code to push a local source code directory as a bundle image to a container registry. Add new flags for container image and local directory settings.
Changes
Fixes #716
Provide the enhancement proposal document around the local source code feature.
A prototype example is documented in here. This should allow you to run a BuildRun using local source code feature via the Shipwright/CLI.
Submitter Checklist
Release Notes