This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new aa3983d3727 chore(doc): scan cloud configuration as properties (#15588)
aa3983d3727 is described below
commit aa3983d37274df9b8445cb57986a047bad067292
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Sep 17 11:29:28 2024 +0200
chore(doc): scan cloud configuration as properties (#15588)
Ref CAMEL-21036
---
.../ROOT/pages/using-propertyplaceholder.adoc | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
index 02e36d7202d..c80917f0ca2 100644
--- a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
@@ -263,6 +263,26 @@ This can also be done when using
xref:consumertemplate.adoc[ConsumerTemplate], s
Object body = template.receiveBody("{{cool.start}}");
----
+== Resolving property placeholders on cloud
+
+When you are running your Camel application on the cloud you may want to
automatically scan any Configmap or Secret as it was an application properties.
Given the following Secret:
+
+----
+apiVersion: v1
+data:
+ my-property: Q2FtZWwgNC44
+kind: Secret
+metadata:
+ name: my-secret
+type: Opaque
+----
+
+You can mount it in your Pod container, for instance, under
`/etc/camel/conf.d/_secrets/my-secret`. Now, just make your Camel application
be aware where to scan your configuration via
`camel.main.cloud-properties-location = /etc/camel/conf.d/_secrets/my-secret`
application properties. It's a comma separated value, so, you can add as many
Secrets/Configmaps you need.
+
+At runtime, you will be able to read the configuration transparently as
`{{my-property}}` as you're doing with the rest of properties.
+
+NOTE: the same configuration works with Configmap.
+
== Resolving property placeholders from Java code
If you need to resolve property placeholder(s) from some Java code, then Camel
has two APIs for this: