-
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
Add Cluster scope pipeline support #1876
Comments
/kind feature |
If nobody is working on this, I will start this evening. |
I believe there was a question about whether ClusterPipelines would be allowed to contain namespaced Tasks when run in a namespace. I think this is probably confusing enough we should punt on it until someone has a specific use case, and only support ClusterTasks in ClusterPipelines at first. |
got it, thanks! |
I think ClusterTask is just for some sample usage. If it is an advantage or complex task or job, we need to define a pipeline to do more steps. Such as cluster scope or level operation by using on the cluster level. Or as we are in a multiple-tenants environment, we have a cluster scope pipeline that allows all namespaces multiple-tenants can use this cluster-level pipeline together. Or we have to define the pipeline in each namespace one by one. |
Here is our case to use ClusterPipelines. We're making multitenant system, each team has it's own project in "control" cluster. Each project has multiple environments(namespaces) like testing, prod, etc, in multiple clusters. In such case i agree that ClusterPipeline should be able to refer only to ClusterTasks, but not namespaced Tasks. |
Support for cluster scoped Pipeline is really critical. A cluster will typically have many namespaces being created (in multi-tenant or even single-tenant), while only a small number of pipelines. Required the commonly used pipeline to have to be deployed in all such namespaces is a big burden on the use of tekon, and a waste of resources. Not to mention upgrading pipelines across all namespaces. Please add this...My believe is that this is a critical practical features for the ease of use and adoption of Tekton. Ideally a admin should setup common pipelines at cluster level, and all devs using the cluster can benefit from those pipelines. |
BTW, the issue of the scope of tasks in cluster level pipeline is in concept easy to deal with. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
na-ah, please don't |
@dbazhal can you plese clarify why you think cluster support for pipelines is not a good idea?! Thanks! |
wat :) i was talking to bot that tried to stale issue. |
Yes, Our service leverages Tekton a lot. And our service is not used for personal user, it is a multiple tenant case, it means we provide some shared Tekton tasks as ClusterTask, so that each namespace user can share or use them. So it is the same case for Cluster scope pipeline. Such as for a common CI/CD or build relate processes. |
We are currently compelled to copy each pipeline into user namespace to execute :D |
Hey all! I think it is likely we'll be moving away from cluster scoped resources ( not sure if @vdemeester and others might disagree) as we add more support for tekton bundles (more tools and support coming soon!) The idea is that there are a lot of limitations to referring to Tasks and Pipelines in the cluster (including namespace scoping and it being hard to version them (#1839)) so we are moving toward a model where you can reference Tasks and Pipelines other places, e.g. the feature we recently added allows you to store them in OCI registries (like images) and reference them there, and we'll likely add support for other locations such as git in the future. |
Aw. Talking about solving concrete problem - absence of reusable pipelines mechanism - how soon could it be done? Wouldn't it be faster to add cluster-scoped pipelines first, and then calm and move to bright future with bundles?) (namespaced pipelines hurt really much) |
I think you can start using it today but I don't know what the mechanics of that look like b/c I think you'd have to create the Bundle by hand? Not 100% sure but I think @imjasonh @vdemeester know more |
tekton bundles makes sense if you could reference directly in taskruns and pipelineruns. If the can only be used to define pipeline specs -- as the docs suggest -- it does does solve the problem, because it requires the pipeline to be defined in each namespace again -- which is the problem at hand. |
This is the case (https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md#specifying-the-target-pipeline). You can use "reference" to tekton bundles in PipelineRun, Pipeline and TaskRun 😉 That said, I do not think we should move away from cluster scoped resources, and the more I think about, the more I don't see why we wouldn't have
This is not really the question. The code is a "detail", what is important is "does ClusterPipeline solve a problem for users ?" or does it make sense. I think it makes sense and as @jsimao71 @dbazhal @zhangtbj wrote, I think there is some need for it even. In OpenShift, having One problem to think about is @imjasonh's comment
Should we allow only Anyway, I think it would make sense to discuss this and implement if we reach a consensus 😉. It would also need to pass through a TEP. |
You can use |
Thanks for the update and discussion @vdemeester. On cluster scoped pipelines refering to namespace scoped tasks as you point out, this can lead to confusions and is somewhat error prone. The exception is when it works kind of "inheritance with override" -- that is, there is a cluster scoped task defined, but it is allowed for a namespace scope task with same name to override the cluster one. |
Any ideas on this? :) Saw 2021 roadmap, there are no cluster pipelines :( |
Yes..its taking some time for Tekton devs realize how important/critical this is. Let's hope it is added to the roadmap. |
I've added this to the API working group discussion next week if any interested folks are able to attend! and/or we can discuss at an upcoming Wednesday working group https://github.com/tektoncd/community/blob/main/working-groups.md#general my 2 cents is that I'd like to move away from using the Cluster as a source of truth (e.g. bundles are an alternative to this but still WIP) but also I could see adding this feature unblock all of you in the meantime |
So we discussed this a bit during the API WG. In a gist, it seems we are leaning towards getting away from
One thing here though, |
Ah, too bad :) We were really hoping pipelines will live with adding cluster pipelines and ability to refer pipelines in pipelines, because there was real need to reuse same pipeline(let's say "deploy to one environment") in other pipelines in different namespaces. |
Understand if it complex to add cluster scope pipeline from technical perspective. We don't have this requirement now because we already downgrade to a single Task in our side. But two cents from me or maybe from user perspective:
We are doing build, but just do build as single step, but for other complex cases like:
|
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Still love this idea, so I'd |
Can anyone tell me what/how to achieve using OCI bundles, can we have any sample to know it better? |
@krishnaraman001 you can find information about Tekton Bundles in the docs. The feature must be enabled first, the docs include details of how to do this. For example:
|
We've now implemented remote pipelines, and we have a cluster-scoped resolver that can resolve pipelines from other namespaces. I think that meets the needs described in this issue, so I'm going to close. Feel free to reopen if any use cases are unaddressed! /close |
@lbernick: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Expected Behavior
We can also define Cluster scope pipeline as ClusterTask
Right now, Tekton has Cluster scope task ClusterTask, but If I also want to run a Cluster scope pipeline which include that ClusterTask.
So that people can define Cluster scope pipeline for all cluster-level users
Actual Behavior
Something like:
The text was updated successfully, but these errors were encountered: