You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "marteloudini (via GitHub)" <gi...@apache.org> on 2025/07/17 08:00:41 UTC
[I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
marteloudini opened a new issue, #6209:
URL: https://github.com/apache/camel-k/issues/6209
### What happened?
While create pipe with configmap configured with Trait, not value is retreive on my pipe properties.
i have allready read all issues, i find one closed but it is with secret, and cry you use , mountPath, env:, etc... but i I don't know if I should go through all this heavy lifting to say, load my configmap, create the directory /etc/camel/conf.d/_configmaps/NAME_OF_CONFIGMAP
and use this file to fill in the placeholders.
### Steps to reproduce
```
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
annotations:
trait.camel.apache.org/mount.configs: configmap:kafka-my-topic-to-log-cm
...
spec:
sink:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: log-sink
source:
properties:
bootstrapServers: {{kafka-not-secured-sink.bootstrapServeurs}}
topic: {{kafka-not-secured-sink.topic}}
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
### Relevant log output
```shell
and in result in my yaml have this :
source:
properties:
bootstrapServers:
'[object Object]': null
topic:
'[object Object]': null
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
### Camel K version
2.7.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3112573974
J'ai pourtant bien suivi vos directives :
camel.kamelet.**{{NAME-OF-KAMELET}}**.**{{TYPE}}**.**{{KEY-OF-PROPERTY}}**
camel.kamelet.**kafka-not-secured-source**.**source**.**bootstrapServeurs**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3113535110
Thanks!
Please don't hesitate to create a discussion issue in one of the camel dashboard repo (https://github.com/camel-tooling/camel-openshift-console-plugin or https://github.com/camel-tooling/camel-dashboard-operator) to give some feedback on which information you feel is missing on openshift 🙏 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3084823972
The way that works well when using the mount trait is to declare your properties with the correct key for implicit configuration. That would be : `camel.kamelet.<kamelet-name>.<kamelet-type>.<property-name=<property-value>`
In your case you should try:
```
data:
application.properties: |
camel.kamelet.kafka-not-secured-source.source.kafka-not-secured-sink.bootstrapServeurs=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
camel.kamelet.kafka-not-secured-sink.sink.topic=my-topic
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3105998988
hello,
i try this :
configMap
```
kind: ConfigMap
apiVersion: v1
metadata:
name: kafka-my-topic-to-log-cm
namespace: camel-k-test
labels:
app.kubernetes.io/instance: pipes-cm
camel.apache.org/config.type: camel-properties
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"application.properties":"camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.bootstrapServeurs=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092\ncamel.kamelet.kafka-not-secured-source.kafka-not-secured-source.topic=my-topic\n"},"kind":"ConfigMap","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"pipes-cm","camel.apache.org/config.type":"camel-properties"},"name":"kafka-my-topic-to-log-cm","namespace":"camel-k-test"}}
data:
application.properties: |
camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.bootstrapServeurs=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.topic=my-topic
```
pipe :
```
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
annotations:
trait.camel.apache.org/mount.configs: '["configmap:kafka-my-topic-to-log-cm"]'
name: kafka-my-topic-to-log
namespace: camel-k-test
labels:
app: camel-k-pipe
spec:
sink:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: log-sink
source:
properties:
bootstrapServers: {{camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.bootstrapServeurs}}
topic: {{camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.topic}}
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
but i have always error and object : null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3084203285
Hi!
Can you try something like that:
```yaml
metadata:
name: kamelets-pipe-secret-parameters-3
annotations:
trait.camel.apache.org/mount.configs: '["configmap:my-timer-source-configmap","secret:my-log-sink-secret"]'
```
The field might be expecting an array even for one value.
I check with the example using mount trait from the [camel-k-examples](https://github.com/apache/camel-k-examples/tree/7799f35cf83448dfbf7579fd841e83a81ad240d3/generic-examples/kamelets/user-config#implicit-configuration) changing the secrets to configmaps and it is still working for me on camel-k 2.7.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3109213991
i have also tried :
ConfigMap :
```
kind: ConfigMap
apiVersion: v1
metadata:
name: kafka-my-topic-to-log-cm
namespace: camel-k-test
labels:
app.kubernetes.io/instance: pipes-cm
camel.apache.org/config.type: camel-properties
annotations:
data:
application.properties: |
**camel.kamelet.kafka-not-secured-source.source.bootstrapServeurs**=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
**camel.kamelet.kafka-not-secured-source.source.topic**=my-topic
```
pipe :
```
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
annotations:
trait.camel.apache.org/mount.configs: '["configmap:kafka-my-topic-to-log-cm"]'
name: kafka-my-topic-to-log
namespace: camel-k-test
labels:
app: camel-k-pipe
spec:
sink:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: log-sink
source:
properties:
bootstrapServers: {{camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.bootstrapServeurs}}
topic: {{camel.kamelet.kafka-not-secured-source.kafka-not-secured-source.topic}}
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3113177151
Yess , thanks you @gansheer
it's work.
im very interresting to see your dashboard camel plugin on Openshift. Because on Openshift operator Camel-K it is poor of information return of all objects 'Camel'.
i follow you.
Fabrice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3084046137
and i also tried :
```
metadata:
annotations:
trait.camel.apache.org/mount.configs: 'configmap:kafka-my-topic-to-log-cm'
```
or
trait.camel.apache.org/mount.configs: 'configmap:kafka-my-topic-to-log-cm'
or
trait.camel.apache.org/mount.configs: '[configmap:kafka-my-topic-to-log-cm]'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini closed issue #6209: trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe.
URL: https://github.com/apache/camel-k/issues/6209
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3084587227
> Hi!
>
> Can you try something like that:
>
> metadata:
> name: kamelets-pipe-secret-parameters-3
> annotations:
> trait.camel.apache.org/mount.configs: '["configmap:my-timer-source-configmap","secret:my-log-sink-secret"]'
> The field might be expecting an array even for one value.
>
> I check with the example using mount trait from the [camel-k-examples](https://github.com/apache/camel-k-examples/tree/7799f35cf83448dfbf7579fd841e83a81ad240d3/generic-examples/kamelets/user-config#implicit-configuration) changing the secrets to configmaps and it is still working for me on camel-k 2.7.
` trait.camel.apache.org/mount.configs: '["configmap:kafka-my-topic-to-log-cm"]'`
but the same error
```
source:
properties:
bootstrapServers:
'[object Object]': null
topic:
'[object Object]': null
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
the logs of pod.
```
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.kafka.common.config.ConfigException: Invalid url in bootstrap.servers: map[[object Object]:<nil>]
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:47)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
... 13 more
Caused by: java.lang.RuntimeException: org.apache.kafka.common.config.ConfigException: Invalid url in bootstrap.servers: map[[object Object]:<nil>]
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:65)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "marteloudini (via GitHub)" <gi...@apache.org>.
marteloudini commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3112535687
```
data:
application.properties: |
camel.kamelet.kafka-not-secured-source.source.kafka-not-secured-sink.bootstrapServeurs=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
camel.kamelet.kafka-not-secured-sink.sink.topic=my-topic
```
??
@gansheer
Je suis allé voir dans les exemples Kamelet - pipe user config.
et ma dernière tentative est la suivante :
configMap :
```
kind: ConfigMap
apiVersion: v1
metadata:
labels:
camel.apache.org/config.type: camel-properties
name: kafka-my-topic-to-log-cm
namespace: camel-k-test
data:
application.properties: |
camel.kamelet.kafka-not-secured-source.source.bootstrapServeurs=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
camel.kamelet.kafka-not-secured-source.source.topic=my-topic
```
my pipe :
```
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
annotations:
name: kafka-my-topic-to-log
namespace: camel-k-test
labels:
app: camel-k-pipe
spec:
integration:
traits:
mount:
configs:
- configmap:kafka-my-topic-to-log-cm
sink:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: log-sink
source:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
```
error log :
```
2025-07-24 08:22:49,778 INFO [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 3.15.3
2025-07-24 08:22:49,780 INFO [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Apache Camel Quarkus 3.15.3 is starting
2025-07-24 08:22:49,784 INFO [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 4.8.5 is starting
2025-07-24 08:22:49,894 INFO [org.apa.cam.k.sup.SourcesSupport] (main) Loading routes from: SourceDefinition{name='camel-k-embedded-flow', language='yaml', type='source', location='file:/etc/camel/sources/camel-k-embedded-flow.yaml', }
2025-07-24 08:22:50,572 WARN [org.apa.cam.imp.eng.AbstractCamelContext] (main) Lifecycle strategy org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler@2db15f70 vetoed initializing CamelContext (camel-1) due to: Failure creating route from template: kafka-not-secured-source
2025-07-24 08:22:50,572 INFO [org.apa.cam.imp.eng.AbstractCamelContext] (main) CamelContext (camel-1) vetoed to not initialize due to: Failure creating route from template: kafka-not-secured-source
2025-07-24 08:22:50,573 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.RuntimeCamelException: org.apache.camel.VetoCamelContextStartException: Failure creating route from template: kafka-not-secured-source
at org.apache.camel.RuntimeCamelException.wrapRuntimeException(RuntimeCamelException.java:68)
at org.apache.camel.support.service.BaseService.doFail(BaseService.java:431)
at org.apache.camel.impl.engine.AbstractCamelContext.doFail(AbstractCamelContext.java:3089)
at org.apache.camel.support.service.BaseService.fail(BaseService.java:360)
at org.apache.camel.impl.engine.AbstractCamelContext.failOnStartup(AbstractCamelContext.java:4013)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2081)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
...........
...........
...........
Caused by: org.apache.camel.component.kamelet.FailedToCreateKameletException: Error creating or loading Kamelet with id kafka-not-secured-source (locations: file:/etc/camel/kamelets/kamelets-bundle-kafka-my-topic-to-log-001,classpath:/kamelets)
at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.createRouteForEndpoint(KameletComponent.java:454)
at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.onContextInitialized(KameletComponent.java:463)
... 27 more
Caused by: java.lang.IllegalArgumentException: Route template kafka-not-secured-source the following mandatory parameters must be provided: bootstrapServers, topic
at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:480)
at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:418)
at org.apache.camel.impl.DefaultCamelContext.addRouteFromTemplate(DefaultCamelContext.java:362)
at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.createRouteForEndpoint(KameletComponent.java:442)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] trait.camel.apache.org/mount.configs with configmap not add values into placeholder on Pipe. [camel-k]
Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on issue #6209:
URL: https://github.com/apache/camel-k/issues/6209#issuecomment-3112736653
I found 2 errors:
* boostratServe**u**r (too french for the kamelets)
* another one on me, there has been a recent change in the implicit properties camel.kamelet.{{NAME-OF-KAMELET}}.{{KEY-OF-PROPERTY}} so it would be **camel.kamelet.kafka-not-secured-source.bootstrapServers** .
So you would have the pipe (you probably don't need the namespace):
```
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: test-kamelet
annotations:
trait.camel.apache.org/mount.configs: configmap:my-cm
spec:
sink:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: log-sink
namespace: camel-k-test
source:
ref:
apiVersion: camel.apache.org/v1
kind: Kamelet
name: kafka-not-secured-source
namespace: camel-k-test
```
With the CM `my-cm` (in the same namespace):
```
apiVersion: v1
data:
application.properties: |
camel.kamelet.kafka-not-secured-source.bootstrapServers=my-cluster-kafka-kafka-bootstrap.kafka.svc:9092
camel.kamelet.kafka-not-secured-source.topic=my-topic
kind: ConfigMap
....
```
That should work better.
BTW it's better to keep it in english for future as most people that can answer will not be able to.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org