-
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
feat(trait): camel trait to include properties #2635
Conversation
0e6430e
to
231ac42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what do you see should be added as parameters to that new configuration trait? I'm asking just to understand what responsibilities should be captured by that new trait, as configuration is a very general concept. So I wonder, if that's going to be application properties and resources, maybe a new runtime trait may be the right abstraction that we are trying to capture, as we have other traits, like camel, builder_, deployer, platform (pretty much every trait) that "configure" things to some extend.
In the immediate term, we should have
I don't have a strong opinion on the name to adopt here. The original discussion was born when we started the refactoring of the user properties and configuration. Considering that the idea is also to replace |
Adding another option to think about I can see also |
It's definitely more tangible than "configuration", but it may be still quite too general. "Integration" is a lot of things. I think we try to follow the single responsibility principle as much as possible for traits, and avoid overlapping across traits. So we would have cmd.Flags().StringArray("config", nil, "Add a runtime configuration from a Configmap, a Secret or a file (syntax: [configmap|secret|file]:name[/key], where name represents the local file path or the configmap/secret name and key optionally represents the configmap/secret key to be filtered)")
cmd.Flags().StringArray("resource", nil, "Add a runtime resource from a Configmap, a Secret or a file (syntax: [configmap|secret|file]:name[/key][@path], where name represents the local file path or the configmap/secret name, key optionally represents the configmap/secret key to be filtered and path represents the destination path)") So from the functional standpoint, for users, it would be about configuring the runtime. If we take the technical standpoint (that may be less relevant for the end-users), these configuration bits are ConfigMap or Secret mounted into the Integration Pod(s), so the pod or container traits may already be responsible for related concerns. |
Quoting #2003, "As today there is a little bit of confusion about the options to configure the runtime", it seems runtime configuration was the original intent of these |
I rest my case... 😆 all good arguments to chose |
LOL, I realise that was "runtime, runtime, bla, runtime...". I did not want to give the impression of pushing a particular term. I though about it, and the more I've dug, the more "runtime" I've found :) I'm not sure if that correlates with good decision making. We can wait a bit to gather more people feedback, even if a consensus / voting algorithm do not necessarily correlates with good decision making neither when it comes to naming things :) |
One thing that bugs me about a runtime trait is that we have the camel trait that has a |
I think it's a good idea. I'll add a follow up PR to take care of it. |
Alternatively, an idea would be to keep the |
I've progressed more deeply and I finally realized that the trait that should be in charge of them would be |
Yes, that was one of my comment above, if we take the technical standpoint, these configuration bits are ConfigMap or Secret mounted into the Integration Pod(s), so the pod or container traits may already be responsible for related concerns. If we don't find a functional standpoint that works and that would be more relevant to users, we can fallback to this approach (even the container trait is already quite crowded). Following that path, the |
Yes, that's correct. The |
Moving the logic previously defined in deployment, cron and knative service into a configuration trait Ref apache#2320
@astefanutti I've moved the logic into |
* Camel trait is the most suitable to control how properties are managed * Some refactoring in trait_test.go as the properties configmap is now managed by camel trait Closes apache#2320
Co-authored-by: Antonin Stefanutti <[email protected]>
Previously drafted in #2519, with this PR we're putting properties management into
camel
trait. We're moving the actual configuration that was used indeployment
,cron
andknative_service
that was taking care of computing configmaps related to camel properties, sources and resources.Ref #2320
Release Note