You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/10/03 08:22:57 UTC

[camel-kamelets-examples] 06/06: PostgreSQL secret refresh: Use application.properties instead of custom name

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git

commit 0193978111644e532f6dff93cf0aedf2b867380a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Oct 3 10:21:16 2023 +0200

    PostgreSQL secret refresh: Use application.properties instead of custom name
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 jbang/postgresql-gcp-secret-refresh/README.adoc          | 16 ++++------------
 .../gcp-sec-refresh.properties                           |  7 -------
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/jbang/postgresql-gcp-secret-refresh/README.adoc b/jbang/postgresql-gcp-secret-refresh/README.adoc
index c643ca2..fe4cf07 100644
--- a/jbang/postgresql-gcp-secret-refresh/README.adoc
+++ b/jbang/postgresql-gcp-secret-refresh/README.adoc
@@ -180,7 +180,7 @@ postgres=# select * from accounts;
 
 === Setting up the GCP Service account key
 
-In the gcp-sec-integration.propertie you'll need to provide all the needed bits and the path to the just created service account key file. So you should have something like this:
+In the application.properties you'll need to provide all the needed bits and the path to the just created service account key file. So you should have something like this:
 
 [source,sh]
 ----
@@ -199,7 +199,7 @@ Then you can run this example using:
 
 [source,sh]
 ----
-$ camel run --properties=gcp-sec-refresh.properties postgresql-log.yaml
+$ camel run postgresql-log.yaml
 ----
 
 Or run it even shorter:
@@ -213,7 +213,7 @@ Or run with JBang using the longer command line (without installing camel as app
 
 [source,sh]
 ----
-$ jbang camel@apache/camel run --properties=gcp-sec-refresh.properties postgresql-log.yaml
+$ jbang camel@apache/camel run postgresql-log.yaml
 ----
 
 This will give the following log:
@@ -223,14 +223,6 @@ This will give the following log:
 2023-07-06 13:51:47.793  INFO 24893 --- [           main] org.apache.camel.main.MainSupport   : Apache Camel (JBang) 3.21.0 is starting
 2023-07-06 13:51:48.024  INFO 24893 --- [           main] org.apache.camel.main.MainSupport   : Using Java 11.0.16.1 with PID 24893. Started by oscerd in /home/oscerd/workspace/apache-camel/camel-kamelets-examples/jbang/postgresql-gcp-secret-refresh
 2023-07-06 13:51:48.036  INFO 24893 --- [           main] mel.cli.connector.LocalCliConnector : Camel CLI enabled (local)
-2023-07-06 13:51:49.189  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport : Auto-configuration summary
-2023-07-06 13:51:49.189  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.main.name=GCPExample
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.projectId=gcp-sec-refresh
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.serviceAccountKey=*****
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.refreshEnabled=true
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.refreshPeriod=60000
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.secrets=database*
-2023-07-06 13:51:49.190  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport :     [gcp-sec-refresh.properties]   camel.vault.gcp.subscriptionName=sub-gcp-sec-refresh
 2023-07-06 13:51:51.418  INFO 24893 --- [           main] main.MainAutowiredLifecycleStrategy : Autowired property: dataSource on component: sql as exactly one instance of type: javax.sql.DataSource (org.apache.commons.dbcp2.BasicDataSource) found in the registry
 2023-07-06 13:51:51.500  INFO 24893 --- [           main] el.impl.engine.AbstractCamelContext : Apache Camel 3.21.0 (GCPExample) is starting
 2023-07-06 13:51:51.724  INFO 24893 --- [           main] g.apache.camel.main.BaseMainSupport : Property-placeholders summary
@@ -310,7 +302,7 @@ You can enable the developer console via `--console` flag as show:
 
 [source,sh]
 ----
-$ camel run --properties=gcp-sec-refresh.properties postgresql-log.yaml --console
+$ camel run postgresql-log.yaml --console
 ----
 
 Then you can browse: http://localhost:8080/q/dev to introspect the running Camel applicaton.
diff --git a/jbang/postgresql-gcp-secret-refresh/gcp-sec-refresh.properties b/jbang/postgresql-gcp-secret-refresh/gcp-sec-refresh.properties
deleted file mode 100644
index 66e2098..0000000
--- a/jbang/postgresql-gcp-secret-refresh/gcp-sec-refresh.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-camel.vault.gcp.projectId=gcp-sec-refresh-1
-camel.vault.gcp.serviceAccountKey = <service_account_key>
-camel.vault.gcp.refreshEnabled=true
-camel.vault.gcp.refreshPeriod=60000
-camel.vault.gcp.secrets=database*
-camel.vault.gcp.subscriptionName=sub-gcp-sec-refresh
-camel.main.name = GCPExample