You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "cfitzw (via GitHub)" <gi...@apache.org> on 2025/05/07 13:50:53 UTC

[I] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

cfitzw opened a new issue, #6157:
URL: https://github.com/apache/camel-k/issues/6157

   ### What happened?
   
   When mounting a file-based configmap, using the `plain-quarkus` runtime, the associated values from the ConfigMap are not made available as properties.
   
   This is only true when using the `plain-quarkus` runtime and works as expected with the default runtime as of v2.6.
   
   ### Steps to reproduce
   
   1. Create a file-based ConfigMap
   2. Pull in the ConfigMap into the integration
   3. Attempt to reference a property:
   
   ```bash
   # file: app.properties
   my-variable=result
   ```
   
   ```bash
   kubectl create configmap my-configmap --from-file=app.properties
   ```
   
   ```yaml
   # camel-k: config=configmap:my-configmap
   
   - from:
       uri: "timer:tick?period=1000"
       steps:
         - setBody:
             simple: "{{my-variable}}"
         - to: "log:info"
   ```
   
   ### Relevant log output
   
   ```shell
   
   ```
   
   ### Camel K version
   
   v2.6


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "eshepelyuk (via GitHub)" <gi...@apache.org>.
eshepelyuk commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364643257

   @squakez leaving it here for others.
   
   I was able to confirm your assumption / suggestion regarding ConfigMap/Secret creation.
   When properties are declared as separate keys on ConfigMap/Secret - plain-quarkus runtime picks up those properties.
   
   One difficulty though is configuring quarkus logs. I've been using property file like this
   
   ```
   quarkus.log.category."ua.eshepelyuk".level = DEBUG
   quarkus.log.category."org.apache.hc.client5.http.wire".level = DEBUG
   ```
   
   I've tried to add those properties a separate keys to ConfigMap but it produced following K8s error
   
   ```
   data[quarkus.log.category."ua.eshepelyuk".level]: Invalid value: "quarkus.log.category.\"ua.eshepelyuk\".level": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name',  or 'KEY_NAME',  or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')
   ```


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "eshepelyuk (via GitHub)" <gi...@apache.org>.
eshepelyuk commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3356686855

   Hello 
   
   is there any progress on this issue, just tried with the latest operator 2.8 and plain-quarkus runtime 3.27 and the bug still exists.


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #6157: Values from file-based ConfigMaps are not available as properties with plain-quarkus
URL: https://github.com/apache/camel-k/issues/6157


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3300767177

   This issue has been automatically marked as stale due to 90 days of inactivity.
   It will be closed if no further activity occurs within 15 days.
   If you think that’s incorrect or the issue should never stale, please simply write any comment.
   Thanks for your contributions!


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364434585

   It's the camel framework version. Camel K uses a runtime (in case of Quarkus, camel-quarkus) which depends on a given camel core version see [1]. Likely next Camel Quarkus 3.29.0 and 3.27.x should contain the patch making this issue to disappear.
   
   [1] https://camel.apache.org/camel-quarkus/next/index.html#_compatibility_matrix


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3371388608

   The manual creation of the secret was just an example. Of course, this makes sense when you're already dealing with a cloud native way in parameters setting. Those Kubernetes config probably requires privileges settings (see https://quarkus.io/guides/kubernetes-config#kubernetes-permissions) in order to work. IMO, if you want to be Kubernetes cloud compliant, you need to have a way to inject configmaps and secret as plain key-values stores. This would help you with rotation, reloading and vault management as well.


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-2862351691

   About the generic question, I've provided an answer in [#camel-k > ✔ Camel K Quarkus ConfigMap Properties @ 💬](https://camel.zulipchat.com/#narrow/channel/257299-camel-k/topic/.E2.9C.94.20Camel.20K.20Quarkus.20ConfigMap.20Properties/near/516848301)


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364403144

   Hello, I had a look again and I think I got now what the problem is. The `plain-quarkus` runtime is not (yet) able to scan a properties file coming from the configmap/secret. From core version 4.15.0/4.14.2 onward (and related quarkus version) this should be no longer happening. Ideally you should turn your secrets or configmap in a plain structure, in which case, the scan of properties work. 
   
   Following the example in the issue, while this is fixed on the core, you can have a configmap/secret defined as:
   ```
   kubectl create configmap my-configmap --from-literal prop1=1 --from-literal prop2=2 ...
   ```


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-2862358630

   > This may or may not be related, but if using the standard .properties `${}` placeholder syntax, camel k is unable to resolve these... meaning using `{{base.fqdn}}` in an integration fails.
   > 
   > # file: app.properties
   > base.env=dev
   > base.domain=domain.com
   > base.fqdn=cluster-${base.env}.${base.domain}
   
   Specifically to this one, this is because Camel K in this case is using a "pre-made" generic build, so the app.properties file variable are not recalculated as it would happen when you build it from source. In version 2.7.0 we're introducing a [build from source (via git project)](https://github.com/apache/camel-k/pull/6128) which should resolve this situation. In any case, you'd be needing to build it from source anyway in order to calculate (and embed into the jar) the properties file.


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "ogomezdi (via GitHub)" <gi...@apache.org>.
ogomezdi commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3360959573

   Hi 
   Just to mention that in my case I've faced no problem with configmap but with secrets as mentioned [#camel-k > Runtime conf base on secrets taken from files not working](https://camel.zulipchat.com/#narrow/channel/257299-camel-k/topic/Runtime.20conf.20base.20on.20secrets.20taken.20from.20files.20not.20working/with/542727728)


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "cfitzw (via GitHub)" <gi...@apache.org>.
cfitzw commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-2858763493

   This may or may not be related, but if using the standard .properties `${}` placeholder syntax, camel k is unable to resolve these... meaning using `{{base.fqdn}}` in an integration fails.
   
   ```bash
   # file: app.properties
   base.env=dev
   base.domain=domain.com
   base.fqdn=cluster-${base.env}.${base.domain}
   ```
   


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "ogomezdi (via GitHub)" <gi...@apache.org>.
ogomezdi commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3371287648

   And what if we try to use directly the option provided by quarkus [Kubernetes Config](https://quarkus.io/guides/kubernetes-config), I've tried to use it adding the dependence and the property pointing to de configmaps and secrets, but not working in Camel-K.
   Regarding creating the cm and secrets with the option "--from-literal" under my point of view it's not useful when dealing with property files have many entries, despite the problems with properties with quoted names.


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "eshepelyuk (via GitHub)" <gi...@apache.org>.
eshepelyuk commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364407899

   Sry, @squakez, what is `core version` ? it a version of what ?


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3492244286

   Available in Camel Quarkus 3.29.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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "eshepelyuk (via GitHub)" <gi...@apache.org>.
eshepelyuk commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364440389

   > It's the camel framework version. Camel K uses a runtime (in case of Quarkus, camel-quarkus) which depends on a given camel core version see [1]. Likely next Camel Quarkus 3.29.0 and 3.27.x should contain the patch making this issue to disappear.
   > 
   > [1] https://camel.apache.org/camel-quarkus/next/index.html#_compatibility_matrix
   
   thank you


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "eshepelyuk (via GitHub)" <gi...@apache.org>.
eshepelyuk commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364868743

   > Yeah, those quotes are bothering. I wonder if you can try removing them, but likely the runtime won't recognize such configuration. The alternative is to use instead env vars such as `QUARKUS_LOG_CATEGORY__UA_ESHEPELYUK__LEVEL` which is working for sure.
   
   Another option is using `spec.traits.camel.properties`


-- 
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] Values from file-based ConfigMaps are not available as properties with plain-quarkus [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6157:
URL: https://github.com/apache/camel-k/issues/6157#issuecomment-3364672261

   Yeah, those quotes are bothering. I wonder if you can try removing them, but likely the runtime won't recognize such configuration. The alternative is to use instead env vars such as `quarkus_log_category__ua_eshepelyuk__level` which is working for sure.


-- 
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