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

[camel-k-examples] branch main updated: fix(resource): Remove reference to resource file

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 6fdb736  fix(resource): Remove reference to resource file
6fdb736 is described below

commit 6fdb736e57a2a4ad126b5cf6606cc07164c86375
Author: Gaelle Fournier <ga...@gmail.com>
AuthorDate: Wed Aug 2 18:25:52 2023 +0200

    fix(resource): Remove reference to resource file
---
 generic-examples/http/NettySecureServer.java   | 11 +++++++++--
 generic-examples/http/NettyServer.java         |  2 +-
 generic-examples/http/PlatformHttpServer.java  |  2 +-
 generic-examples/http/PlatformHttpsServer.java |  2 +-
 generic-examples/http/README.md                | 10 +++++-----
 5 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/generic-examples/http/NettySecureServer.java b/generic-examples/http/NettySecureServer.java
index c6fecd6..202a9d8 100644
--- a/generic-examples/http/NettySecureServer.java
+++ b/generic-examples/http/NettySecureServer.java
@@ -21,10 +21,17 @@
 // keytool -exportcert -alias EntryName -keystore keystore.jks -rfc -file public.cert
 // keytool -import -alias EntryName -file public.cert -storetype JKS -keystore truststore.jks
 
+// Create the secrets associated with the stores:
+//
+// kubectl create secret generic http-keystore --from-file keystore.jks
+// kubectl create secret generic http-truststore --from-file truststore.jks
+
 // Run the integration:
 //
-// kamel run NettySecureServer.java --resource file:keystore.jks@/etc/ssl/keystore.jks 
-//                                  --resource file:truststore.jks@/etc/ssl/truststore.jks -t container.port=8443 --dev
+// kamel run NettySecureServer.java
+//        -t mount.resources=secret:http-keystore/keystore.jks@/etc/ssl/keystore.jks
+//        -t mount.resources=secret:http-truststore/truststore.jks@/etc/ssl/truststore.jks
+//        -t container.port=8443 -t service.type=NodePort --dev
 
 // Test
 //
diff --git a/generic-examples/http/NettyServer.java b/generic-examples/http/NettyServer.java
index 96b244d..85850d0 100644
--- a/generic-examples/http/NettyServer.java
+++ b/generic-examples/http/NettyServer.java
@@ -17,7 +17,7 @@
 
 // Run integration
 //
-// kamel run NettyServer.java --dev
+// kamel run NettyServer.java -t service.type=NodePor --dev
 
 // Test
 //
diff --git a/generic-examples/http/PlatformHttpServer.java b/generic-examples/http/PlatformHttpServer.java
index 57175c0..04599c1 100644
--- a/generic-examples/http/PlatformHttpServer.java
+++ b/generic-examples/http/PlatformHttpServer.java
@@ -17,7 +17,7 @@
 
 // Run integration
 //
-// kamel run PlatformHttpServer.java --dev -t service.enabled=true
+// kamel run PlatformHttpServer.java -t service.enabled=true -t service.type=NodePort --dev
 
 // Test
 //
diff --git a/generic-examples/http/PlatformHttpsServer.java b/generic-examples/http/PlatformHttpsServer.java
index cfba77d..b8fcb3e 100644
--- a/generic-examples/http/PlatformHttpsServer.java
+++ b/generic-examples/http/PlatformHttpsServer.java
@@ -29,7 +29,7 @@
 // kamel run PlatformHttpsServer.java -p quarkus.http.ssl.certificate.file=/etc/ssl/my-self-signed-ssl/server.crt
 //                                    -p quarkus.http.ssl.certificate.key-file=/etc/ssl/my-self-signed-ssl/server.key
 //                                    --resource secret:my-self-signed-ssl@/etc/ssl/my-self-signed-ssl
-//                                    -t container.port=8443 --dev
+//                                    -t container.port=8443 -t service.type=NodePort --dev
 
 // Test
 //
diff --git a/generic-examples/http/README.md b/generic-examples/http/README.md
index bd5b086..124e390 100644
--- a/generic-examples/http/README.md
+++ b/generic-examples/http/README.md
@@ -24,13 +24,13 @@ cluster before starting the example.
 ## Running the Examples
 
 ### Run the Integration in `NettySecureServer.java`:
-This integration requires a Keystore and a Truststore. Open [NettySecureServer.java](./NettySecureServer.java) to find instructions on how to generate a required `keystore.jks` 
-and `truststore.jks` file. For this example, keystore and trustore password is `changeit`
+This integration requires a Keystore and a Truststore. Open [NettySecureServer.java](./NettySecureServer.java) to find instructions on how to generate a required `keystore.jks` and `truststore.jks` file. For this example, keystore and trustore password is `changeit`
 
 Run the integration:
 ```
-kamel run NettySecureServer.java --resource file:keystore.jks@/etc/ssl/keystore.jks \
-    --resource file:truststore.jks@/etc/ssl/truststore.jks -t container.port=8443 --dev
+kamel run NettySecureServer.java -t mount.resources=secret:http-keystore/keystore.jks@/etc/ssl/keystore.jks \
+        -t mount.resources=secret:http-truststore/truststore.jks@/etc/ssl/truststore.jks \
+        -t container.port=8443 -t service.type=NodePort --dev
 ```
 Get the service location. If you're running on minikube, run `minikube service netty-secure-server --url=true --https=true` \
 Visit `https://<service-location>/hello`. You should see "Hello Secure World" displayed on the web page. \
@@ -39,4 +39,4 @@ Alternatively, you could run: `curl -k https://<service-location>/hello`.
 ### Run the other Integrations:
 - Open [NettyServer.java](./NettyServer.java) to find instruction on how to run the integration.
 - Open [PlatformHttpsServer.java](./PlatformHttpsServer.java) to find instructions on how to generate a required private key and self-signed certificate, and also how to run the integration.
-- Open [PlatformHttpServer.java](./PlatformHttpServer.java) to find instruction on how to run the integration.
\ No newline at end of file
+- Open [PlatformHttpServer.java](./PlatformHttpServer.java) to find instruction on how to run the integration.