You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Kratix resource of kind: Pipeline is not a real CRD, and has no controller associated to it. Both the Promise and the Dynamic controller are responsible for generating the Job (and creating the associated resources) to execute the user-provided container.
Apart from the code being very complex and hard to understand, it muddles up the responsibilities. It also makes features like retrying or re-triggering, getting logs, doing validations, etc more complex. Extracting it to its own controller backed by its own CRD will hopefully make it simpler.
Engineering Notes
If we go deep into refactoring the pipeline code itself, we may spend a lot of time in this story. To avoid that, focus on adding the controller and crd, and porting over the existing functionality. We can work on improving the code itself on a later chore.
The existing features must still exist at the place/level they exist today. For example:
Manual reconciliation from the promise/resource
Promise / Resource status and conditions
Promise Availability, etc
Although surfacing events and status to the new Pipeline object would be great, leave it to the end and create a follow up story if this is already dragging for too much
Scenarios
Given a promise with promise configure pipelines
When I apply the promise
Then I see a new "Pipeline" object being created in the "kratix-platform-system" namespace
And the promise configure workflow runs as expected
And I can observe the promise status for the pipeline
Given a promise with resource configure pipelines
When I apply the promise and request a resource
Then I see a new "Pipeline" object being created in the resource's namespace
And the resource configure workflow runs as expected
And I can observe the resource status for the pipeline
Given a promise with resource delete pipelines
When I delete a previously applied resource
Then I see a new "Pipeline" object being created in the resource's namespace
And the resource delete workflow runs as expected
And they all disappear when the pipeline completes
Given a promise with promise delete pipelines
And a couple of resources created from that promise
When I delete a the promise
Then I see a new "Pipeline" object being created in the resources's namespace
And the resource delete workflow runs as expected
And all resources disappear when the pipelines complete
Then I see a new "Pipeline" object being created in the "kratix-platform-system" namespace
And the promise delete workflow runs as expected
And the promise disappears when the pipeline completes
The text was updated successfully, but these errors were encountered:
kirederik
changed the title
chore: make kratix pipeline a crd
chore(kratix): make kratix pipeline a crd
Mar 7, 2025
Motivation
Currently, the Kratix resource of
kind: Pipeline
is not a real CRD, and has no controller associated to it. Both the Promise and the Dynamic controller are responsible for generating the Job (and creating the associated resources) to execute the user-provided container.Apart from the code being very complex and hard to understand, it muddles up the responsibilities. It also makes features like retrying or re-triggering, getting logs, doing validations, etc more complex. Extracting it to its own controller backed by its own CRD will hopefully make it simpler.
Engineering Notes
Scenarios
The text was updated successfully, but these errors were encountered: