camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Make Builder trait independent from the Quarkus trait

Open squakez opened this issue 2 years ago • 4 comments

The builder trait needs to know certain parameters available in the Quarkus trait in order to perform its tasks accordingly (ie, native image task definition and pod resource configuration). However, the quarkus trait is executed after the builder task and is required by the Quarkus trait which is in charge to influence the Build custom resource initialized in the builder trait.

We need to change the process to make the builder trait completely agnostic from the Quarkus trait, making the quarkus trait able to influence the Build if that is what is needed.

squakez avatar Sep 27 '23 10:09 squakez

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Dec 27 '23 00:12 github-actions[bot]

@squakez do I get it right that basically this:

https://github.com/apache/camel-k/blob/b7b6a07546c555be39f1fe26f67290492f61455f/pkg/trait/builder.go#L72

should not be necessary? If there are other places where builder trait is aware of Quarkus trait and shouldn't, can you specify them please? (or just give me a hint)

I'll try to address it, it will take me long time, but the issue does not seem urgent.

michalvavrik avatar Jan 16 '24 16:01 michalvavrik

Yes. The problem is the coupling we may have among traits. We need to find a way to decouple. However it may require a deep review of how this would affect the entire operator building process. Feel free to have a look and provide any better design to improve this part.

squakez avatar Jan 16 '24 16:01 squakez

Understood, thanks

michalvavrik avatar Jan 16 '24 17:01 michalvavrik