-
Notifications
You must be signed in to change notification settings - Fork 341
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
Builder trait maven-profiles expect the profile in the operator namespace #5372
Comments
Yes, as the there is the user scoped |
Could the feature only work for namespaced operator? We can add a check on the builder trait and warn the user that the option would not take effect as the Integration is operated by a global operator. Or is this feature also used internally by the operator by any chance? |
The feature is used for the Jib publish startegy. A configmap containing the JIB profile is created in the operator namespace. This configmap is owned by the IntegrationKit.
If the configmap is created in the operator namespace, it actually works. |
Okey, then, if IIUC this problem is not affecting the general build, but only a build where we expect a profile provided by the user. As you correctly said, the profile is meant to be a configuration of the IntegrationKit, hence, it's natural place is the IntegrationKit namespace. I think this particular situation should be only documented as available providing the configmap in the namespace where the operator is going to create the IntegrationKit (if it would change in the future) if the user really needs it. It is reported correctly in conditions, so it is quite clear the reason why this is failing:
|
What happened?
When working with the following topology:
the build is in error because it expects to find the configmap/secret containing the maven profile in the namespace where the operator is deployed.
In a way it make sense that this behavior is applied since the maven-profile is a build parameter and the build is done by the Camel K operator. At the same time, in theory, when a user creates its own integration he should not need to access the operator namespace.
Which brings the real issue: shoud the user be able to build a Camel K Integration project defining its own maven profile and declare it or should we expect the build parameters to only use maven-profiles pre-created?
Note: This issue is also valid for this feature : #4639
Steps to reproduce
kamel install --global -n camel-k
kubectl create namespace user1
kubectl create configmap maven-profile-dependency --from-file=[path]/dependency-profile.xml -n user1
kamel run Test.java -t builder.maven-profiles=configmap:maven-profile-dependency/dependency-profile.xml -n user1
Relevant log output
Camel K version
main, 2.3.x
The text was updated successfully, but these errors were encountered: