-
Notifications
You must be signed in to change notification settings - Fork 89
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
How to structure kustomize packages for Tekton CD pipelines for Kubeflow #544
Comments
i had refactored pipelines here https://github.com/kkasravi/kfctl-config-files/tree/master/tk/tk-pipelines. It solves some of the problems noted
|
1 similar comment
i had refactored pipelines here https://github.com/kkasravi/kfctl-config-files/tree/master/tk/tk-pipelines. It solves some of the problems noted
|
I updated https://github.com/kkasravi/kfctl-config-files/blob/master/kfdef/ci-profile-controller-pipeline-run.yaml to work with tk-pipelines. If you do
and generated kustomize subdir |
@kkasravi I really don't want to use kfctl here. Conceptually it is really confusing. I think of Kubeflow as Kubeflow control plane. Not as some general configuration management solution. We already have two layers of configuration management
So its not clear to me why we would need kfctl. Is Why do we want unique Task names? I thought we would use well defined Tasks to allow reusability across runs & pipelines. |
i'm not suggesting we use kfctl - it's just a way to generate the pipelinerun code. $(generateName) is kfctl magic that would generate a unique suffix.
it could be
but you would need to use kubectl create instead of apply Task names don't need to be unique as long as they're completely parameterized. |
@jlewi |
@jlewi |
@kkasravi I don't think generateName works with kustomize (I believe I tried that). I think we could work around that by doing something like
(Thinking out loud) we have two dimensions along which we want to stamp out multiple pipeline definitions
Lets start with the Tasks Right now we have two
These are already parameterized using Tekton Resources. Is there any reason we would need multiple instances of these tasks? i.e can we just use Tekton parameterization? Lets assume we don't use kustomize at all. Then we need to do the following
What if we start as follows
|
if we embed PipelineResource and Pipeline into PipelineRun do we reduce the permutations?
|
@kkasravi if we go the route of embedding everything in PipelineRun; does that end up being any different from using multiple resources and relying on kustomize |
* kubeflow/testing is the central repository where all reusable engprod code goes. As a result it makes sense for the reusable Tekton definitions and scripts related to continuous building and updating of Kubeflow applications to live here * For now, we will also centralize the definition of pipelines for all applications in this repository (as opposed to having them live in the application repositories). * This should make it easier to manage and automatically update all applications. * Per kubeflow#544 redo how we use kustomize and Tekton to parameterize the pipelines. * Individual runs of pipelines will rely completely on Tekton parameter substitution to create a run to build an image for a specific application at a specific commit. * The image URL and git commit of source code will be Tekton PipelineResources that are inlined in the PipelineRun * For any parameters we will use Tekton parameters and inline the values in the PipelineRun * PipelineRuns will just be created as YAML files and not as kustomize overlays * Right now we have a single kustomize package which defines the reusable elements which are Tekton Tasks and Pipeline resources * Right now we have a single Pipeline for all applications but in the future we might have application specific pipelines * rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather than the digest. * This image tagging scheme will be the basis for determining whether the image is already up to date (kubeflow#545) * since we now specify the full image_url rather than using image name we need a parameter for the src_image that is used with the kustomize edit function.
* kubeflow/testing is the central repository where all reusable engprod code goes. As a result it makes sense for the reusable Tekton definitions and scripts related to continuous building and updating of Kubeflow applications to live here * For now, we will also centralize the definition of pipelines for all applications in this repository (as opposed to having them live in the application repositories). * This should make it easier to manage and automatically update all applications. * Per kubeflow#544 redo how we use kustomize and Tekton to parameterize the pipelines. * Individual runs of pipelines will rely completely on Tekton parameter substitution to create a run to build an image for a specific application at a specific commit. * The image URL and git commit of source code will be Tekton PipelineResources that are inlined in the PipelineRun * For any parameters we will use Tekton parameters and inline the values in the PipelineRun * PipelineRuns will just be created as YAML files and not as kustomize overlays * Right now we have a single kustomize package which defines the reusable elements which are Tekton Tasks and Pipeline resources * Right now we have a single Pipeline for all applications but in the future we might have application specific pipelines * rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather than the digest. * This image tagging scheme will be the basis for determining whether the image is already up to date (kubeflow#545) * since we now specify the full image_url rather than using image name we need a parameter for the src_image that is used with the kustomize edit function. * Use a separate task for updating the manifests * Now that we are using image tags of the form "{TAG}-{COMMIT}" which is determined at pipeline construction time; we no longer need to pass the digest file between the build-push step and the update manifests task which makes it much easier to run them as separate task since we don't need a pod volume to share data. Related to kubeflow#450 - CD pipelines for Kubeflow.
* kubeflow/testing is the central repository where all reusable engprod code goes. As a result it makes sense for the reusable Tekton definitions and scripts related to continuous building and updating of Kubeflow applications to live here * For now, we will also centralize the definition of pipelines for all applications in this repository (as opposed to having them live in the application repositories). * This should make it easier to manage and automatically update all applications. * Per kubeflow#544 redo how we use kustomize and Tekton to parameterize the pipelines. * Individual runs of pipelines will rely completely on Tekton parameter substitution to create a run to build an image for a specific application at a specific commit. * The image URL and git commit of source code will be Tekton PipelineResources that are inlined in the PipelineRun * For any parameters we will use Tekton parameters and inline the values in the PipelineRun * PipelineRuns will just be created as YAML files and not as kustomize overlays * Right now we have a single kustomize package which defines the reusable elements which are Tekton Tasks and Pipeline resources * Right now we have a single Pipeline for all applications but in the future we might have application specific pipelines * rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather than the digest. * This image tagging scheme will be the basis for determining whether the image is already up to date (kubeflow#545) * since we now specify the full image_url rather than using image name we need a parameter for the src_image that is used with the kustomize edit function. * Use a separate task for updating the manifests * Now that we are using image tags of the form "{TAG}-{COMMIT}" which is determined at pipeline construction time; we no longer need to pass the digest file between the build-push step and the update manifests task which makes it much easier to run them as separate task since we don't need a pod volume to share data. Related to kubeflow#450 - CD pipelines for Kubeflow.
* Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
* kubeflow/testing is the central repository where all reusable engprod code goes. As a result it makes sense for the reusable Tekton definitions and scripts related to continuous building and updating of Kubeflow applications to live here * For now, we will also centralize the definition of pipelines for all applications in this repository (as opposed to having them live in the application repositories). * This should make it easier to manage and automatically update all applications. * Per #544 redo how we use kustomize and Tekton to parameterize the pipelines. * Individual runs of pipelines will rely completely on Tekton parameter substitution to create a run to build an image for a specific application at a specific commit. * The image URL and git commit of source code will be Tekton PipelineResources that are inlined in the PipelineRun * For any parameters we will use Tekton parameters and inline the values in the PipelineRun * PipelineRuns will just be created as YAML files and not as kustomize overlays * Right now we have a single kustomize package which defines the reusable elements which are Tekton Tasks and Pipeline resources * Right now we have a single Pipeline for all applications but in the future we might have application specific pipelines * rebuild_manifests.sh should use the image tag v0.x.y-${commit} rather than the digest. * This image tagging scheme will be the basis for determining whether the image is already up to date (#545) * since we now specify the full image_url rather than using image name we need a parameter for the src_image that is used with the kustomize edit function. * Use a separate task for updating the manifests * Now that we are using image tags of the form "{TAG}-{COMMIT}" which is determined at pipeline construction time; we no longer need to pass the digest file between the build-push step and the update manifests task which makes it much easier to run them as separate task since we don't need a pod volume to share data. Related to #450 - CD pipelines for Kubeflow.
* Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
* Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
* Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low/kubeflow#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low/kubeflow#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low/kubeflow#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low/kubeflow#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
…low/kubeflow#4593) * Delete all the Tekton pipelines and scripts for continuous delivery of Kubeflow applications because they are moving into kubeflow/testing * kubeflow/testing#551 is the PR moving the code into kubeflow/testing Related to: kubeflow/testing#544 redo how we use kustomize and Tekton to parameterize the pipelines
We are trying to define Tekton pipelines to continuously build and update our kustomize manifests for Kubeflow applications: #450
We currently have some initial pipelines checked in here
https://github.com/kubeflow/kubeflow/tree/master/components/base
https://github.com/kubeflow/kubeflow/tree/master/components/profile-controller/ci
The way the kustomize packages are laid out makes a number of operations inconvenient.
I'd like to figure out a good way to restructure the kustomize packages and tekton resources.
Here are somethings I'd like to facilitate.
I'd like to define different versions of the pipelines corresponding to different versions of Kubeflow
We'd like to make it easy for release engineer to kick off PipelineRun's for all Kubeflow applications or to kick off runs for individual pipelines
The current layout has the following challenges.
PipelineRun's are structured as overlays; so its easy to trigger a run for a specific application
but not runs for all the applications
The PipelineRun name is not unique on each build; so firing off multiple runs of a pipeline isn't easy
A couple ideas questions
Should the PipelineRuns be a completely separate kustomize package from the other resources e.g we have the layout
This would make it easy to do a bulk run of all the pipelines at a specific version
We could use kustomize suffix generation to generate unique names for the runs
To run a specific pipeline we can use
apply
's label selector e.g.Downside is the pipeline definitions and run definitions can't easily share config
The text was updated successfully, but these errors were encountered: