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

chore(kratix): make kratix pipeline a crd #405

Open
kirederik opened this issue Mar 4, 2025 · 0 comments
Open

chore(kratix): make kratix pipeline a crd #405

kirederik opened this issue Mar 4, 2025 · 0 comments

Comments

@kirederik
Copy link
Member

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

  • 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
@kirederik kirederik changed the title chore: make kratix pipeline a crd chore(kratix): make kratix pipeline a crd Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant