-
Notifications
You must be signed in to change notification settings - Fork 352
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
[discussion] feat: configuration trait #2519
Conversation
I think that implementing those points is a good opportunity to cleanup the code and make it more consistent so +1 with me
This point is not super clear to me, in particular the reason to remove the trait from the integration.
I think that trait.Configure for the configuration trait, should by default attempt to converting the |
Thanks Luca, some clarification inline:
I did not explain properly. I was meaning that, as soon as we go deep in the development, we may be in the opportunity to apply the same mechanics used in the new
It's a good approach. I was thinking about maintaining temporarily the repeated logic (ie, e.computeConfigmaps() + the new logic), though I don't like repeated code. I will apply your suggestion as it looks cleaner. |
I think those are good points and I don't really have anything to add to them right now. I do have a comment about the following:
+1. I don't really worry with the specifics of the technical implementation at this point, but I think we should aim for a solution that allows seamless migration from one to another from the user perspective. |
Superseded by #2635 |
This draft PR serves as an helper to discuss the changes required to develop feature #2320.
Right now a property file or other resources attached to an
Integration
, are materialized viadeployment
,cron
orknative_service
traits. If we introduce theconfiguration
trait we can let this take care of this aspect, although I am not entirely sure if this will have some drawback I am not able to see at the moment (see the changes proposed). It basically means moving the logic that is taking care of it (e.computeConfigmaps()
) from the 3 trait into the other one. We are introducing some trait dependency (toconfiguration
trait), but I don't see this a big concern.If we're happy with point 1, then we'll need to start moving the logic that is happening now in the
e.computeConfigmaps()
directly in the configuration trait. As an example, in this PR you will see I've done this with theProperties
parameter which is going to take care of the user properties.What was done here with
Properties
will have to be extended with all the other user configuration such asconfig
,resource
, ... It seems doable with no big concerns either.ConfigurationSpec
is widely used inIntegration
,IntegrationKit
and only in one case inIntegrationPlatform
. If we proceed with this design change we may be in the situation to extend the trait to the kit as well. Or we can keep it in the kit and the platform and just remove from the integration spec only.The backward compatibility is something we will have to take case as well. I think we can find some way to let both approach (
integration.spec.configspec
andconfiguration
trait) coexist, deprecating the first and eventually remove it.It does not look an easy development as there are several dependencies to the
ConfigurationSpec
. In any case, with the approach proposed we will be able to have all in a unique place, although it means we will depends on a trait. With the changes proposed here I manage to make an integration work seamlessly.@astefanutti, @lburgazzoli you were involved in the past in this discussion, I'll gladly receive your feedback to confirm if the approach is fine and it's worth to keep ahead with this.
CC @nicolaferraro @oscerd @doru1004 @jamesnetherton @johnpoth @tadayosi @orpiske @davsclaus, happy if you can have a look as well.
Release Note