-
Notifications
You must be signed in to change notification settings - Fork 340
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
Redesign traits that have runtime dependencies #4166
Comments
There are three types of camel-k traits
There is camel-catalog that drives the artifacts and dependency resolution according to the runtime, the camel-catalog is generated by camel-k-runtime. With this approach the addons/vault/* trais can be removed, then in this case the user has to use the long camel property names, example: Using
No traits, setting the runtime property:
In this example, having the short properties enhances the user experience at the expense of having a hard dependency to the runtime property (camel quarkus or camel). In the case the user wants to use a non quarkus runtime, there should be an intermediate layer to decide how the trait behavior should be used for the runtime. This intermediate layer can be camel-k-runtime. The Cron trait has some additional behavior:
This was just an example, to collect some feedback about the necessity to have an intermediate layer to negotiate the behavior between camel-k operator and the target runtime. |
The master trait has a different behavior compared to the other traits, in that the master trait is backed by |
I'm not sure we should use properties as it seems a little bit confusing to me, as example, if you want to configure something related to the memory consumed by a pod, then using a property seems to be misleading as that's usually something you pass to the runtime. It will also leak some property to the user which may them rely on them which would increase our maintenance cost. In some of the previous conversation we had, we discussed:
|
What are the build time properties we need for camel-k ? |
I second Luca's comment.
Additionally I suggest you to perform an iterative approach instead of a complete design ahead of time, as there are many details that would be difficult to analyze without testing and experimenting. In a very high level analysis I realized that the majority of runtime configuration we slip into the operator are runtime dependencies. I'd start focusing on this development that seems to be quite relevant and later moving on other aspects of the problem. As I suggested in some earlier conversation, we can include such dependencies in the catalog, and let discover them by the operator when building the application. The new catalog can look like:
That development has to be performed on the Camel K runtime and later the same mechanism exposed for any other runtime we eventually support. |
These seems very much what we have today in camel-k-runtime catalog in the capabilities section, except there is no spring boot provider yet.
When I changed master trait to use camel-quarkus-kubernetes, I had to retrieve the resource type and name, from the build property, that change was not merged into camel-k, so there is no build time property to use in camel-k currently. Perhaps extracts the capabilities logic from Pasquale suggestion seems the shortest path to experiment with the quarkus provider. Thank you for the comments. |
With one but quite relevant difference that instead of having camel-k knowing the properties to set, camel-k declares what properties it will set (if needed) when the trait is active and the runtime translates it into what it needs to materialize the requirement (in term of properties).
I think we could evaluate to have a dedicated extension in quarkus if it make sense, like camel-quarkus-master-kubernetes and have it enabled by default when the extension is added. I think as today it is disabled as the master component is part of the TL:DR; I believe we must have some better collaboration between the runtimes and camel-k as having camel-k keeping track of the runtime changes/needs is going to be challenging in the long term.
This whole thing should be moved to the runtime part, I don't expect to have the camel-k-runtime anymore but have a camel-k extension in quarkus , camel-k starter in spring boot and all the related runtime specific tooling (maven plugins, builder images, etc) |
As we're discussing to let Camel K deploy any Camel application for the future, we should identify those traits that have runtime dependencies and redesign them to make generic allowing any future runtime to be able to use it. There may be cases very specific (such as Quarkus trait which only belongs to Camel Quarkus runtime) where it makes sense to delegate such trait in the runtime or in the specific builder.
The text was updated successfully, but these errors were encountered: