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

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

commit f7a0e3d6be62a2b6485fa747dec6860910064873
Author: Gaelle Fournier <[email protected]>
AuthorDate: Tue May 21 15:08:54 2024 +0200

    fix(e2e): Deprecated SSL quarkus configuration
---
 docs/modules/traits/pages/route.adoc | 6 +++---
 e2e/common/traits/route_test.go      | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/modules/traits/pages/route.adoc 
b/docs/modules/traits/pages/route.adoc
index deb4d0cd4..d797ff8ca 100755
--- a/docs/modules/traits/pages/route.adoc
+++ b/docs/modules/traits/pages/route.adoc
@@ -143,17 +143,17 @@ kamel run --dev PlatformHttpServer.java -t 
route.tls-termination=edge -t route.t
 * To add a *passthrough* route using secrets, the TLS is setup in the 
integration pod, the keys and certificates should be visible in the running 
integration pod, to achieve this we are using the `--resource` kamel parameter 
to mount the secret in the integration pod, then we use some camel quarkus 
parameters to reference these certificate files in the running pod, they start 
with `-p quarkus.http.ssl.certificate`. This route example trait references a 
secret named `my-combined-certs` wh [...]
 +
 [source,console]
-kamel run --dev PlatformHttpServer.java --resource 
secret:my-combined-certs@/etc/ssl/my-combined-certs -p 
quarkus.http.ssl.certificate.file=/etc/ssl/my-combined-certs/tls.crt -p 
quarkus.http.ssl.certificate.key-file=/etc/ssl/my-combined-certs/tls.key -t 
route.tls-termination=passthrough -t container.port=8443
+kamel run --dev PlatformHttpServer.java --resource 
secret:my-combined-certs@/etc/ssl/my-combined-certs -p 
quarkus.http.ssl.certificate.files=/etc/ssl/my-combined-certs/tls.crt -p 
quarkus.http.ssl.certificate.key-files=/etc/ssl/my-combined-certs/tls.key -t 
route.tls-termination=passthrough -t container.port=8443
 
 * To add a *reencrypt* route using secrets, the TLS is setup in the 
integration pod, the keys and certificates should be visible in the running 
integration pod, to achieve this we are using the `--resource` kamel parameter 
to mount the secret in the integration pod, then we use some camel quarkus 
parameters to reference these certificate files in the running pod, they start 
with `-p quarkus.http.ssl.certificate`. This route example trait references a 
secret named `my-combined-certs` whic [...]
 +
 [source,console]
-kamel run --dev PlatformHttpServer.java --resource 
secret:my-combined-certs@/etc/ssl/my-combined-certs  -p 
quarkus.http.ssl.certificate.file=/etc/ssl/my-combined-certs/tls.crt -p 
quarkus.http.ssl.certificate.key-file=/etc/ssl/my-combined-certs/tls.key -t 
route.tls-termination=reencrypt -t 
route.tls-destination-ca-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-key-secret=my-combined-certs/tls.key -t container.port=8443
+kamel run --dev PlatformHttpServer.java --resource 
secret:my-combined-certs@/etc/ssl/my-combined-certs  -p 
quarkus.http.ssl.certificate.files=/etc/ssl/my-combined-certs/tls.crt -p 
quarkus.http.ssl.certificate.key-files=/etc/ssl/my-combined-certs/tls.key -t 
route.tls-termination=reencrypt -t 
route.tls-destination-ca-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-key-secret=my-combined-certs/tls.key -t container.port=8443
 
 * To add a *reencrypt* route using a specific certificate from a secret for 
the route and 
https://docs.openshift.com/container-platform/4.8/security/certificates/service-serving-certificate.html#add-service-certificate_service-serving-certificate[OpenShift
 service serving certificates] for the integration endpoint. This way the 
OpenShift service serving certificates is set up only in the integration pod. 
The keys and certificates should be visible in the running integration pod, to 
achie [...]
 +
 [source,console]
-kamel run --dev PlatformHttpServer.java --resource 
secret:cert-from-openshift@/etc/ssl/cert-from-openshift  -p 
quarkus.http.ssl.certificate.file=/etc/ssl/cert-from-openshift/tls.crt -p 
quarkus.http.ssl.certificate.key-file=/etc/ssl/cert-from-openshift/tls.key -t 
route.tls-termination=reencrypt -t 
route.tls-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-key-secret=my-combined-certs/tls.key -t container.port=8443
+kamel run --dev PlatformHttpServer.java --resource 
secret:cert-from-openshift@/etc/ssl/cert-from-openshift  -p 
quarkus.http.ssl.certificate.files=/etc/ssl/cert-from-openshift/tls.crt -p 
quarkus.http.ssl.certificate.key-files=/etc/ssl/cert-from-openshift/tls.key -t 
route.tls-termination=reencrypt -t 
route.tls-certificate-secret=my-combined-certs/tls.crt -t 
route.tls-key-secret=my-combined-certs/tls.key -t container.port=8443
 +
 Then you should annotate the integration service to inject the OpenShift 
service serving certificates
 +
diff --git a/e2e/common/traits/route_test.go b/e2e/common/traits/route_test.go
index 027bd6d72..61149557d 100644
--- a/e2e/common/traits/route_test.go
+++ b/e2e/common/traits/route_test.go
@@ -152,7 +152,7 @@ func TestRunRoutes(t *testing.T) {
                // TLS Route Passthrough
                // =============================
                t.Run("Route passthrough https works", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/PlatformHttpServer.java", "--resource", 
"secret:"+secretName+"@/etc/ssl/"+secretName, "-p", 
"quarkus.http.ssl.certificate.file=/etc/ssl/"+secretName+"/tls.crt", "-p", 
"quarkus.http.ssl.certificate.key-file=/etc/ssl/"+secretName+"/tls.key", "-t", 
"route.tls-termination=passthrough", "-t", 
"container.port=8443").Execute()).To(Succeed())
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/PlatformHttpServer.java", "--resource", 
"secret:"+secretName+"@/etc/ssl/"+secretName, "-p", 
"quarkus.http.ssl.certificate.files=/etc/ssl/"+secretName+"/tls.crt", "-p", 
"quarkus.http.ssl.certificate.key-files=/etc/ssl/"+secretName+"/tls.key", "-t", 
"route.tls-termination=passthrough", "-t", 
"container.port=8443").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
integrationName), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        route := Route(t, ctx, ns, integrationName)
                        g.Eventually(route, 
TestTimeoutMedium).ShouldNot(BeNil())
@@ -169,7 +169,7 @@ func TestRunRoutes(t *testing.T) {
                // TLS Route Reencrypt
                // =============================
                t.Run("Route Reencrypt https works", func(t *testing.T) {
-                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/PlatformHttpServer.java", "--resource", 
"secret:"+secretName+"@/etc/ssl/"+secretName, "-p", 
"quarkus.http.ssl.certificate.file=/etc/ssl/"+secretName+"/tls.crt", "-p", 
"quarkus.http.ssl.certificate.key-file=/etc/ssl/"+secretName+"/tls.key", "-t", 
"route.tls-termination=reencrypt", "-t", 
"route.tls-destination-ca-certificate-secret="+refCert, "-t", 
"route.tls-certificate-secret="+refCert, "-t", "route.tls-key-secret="+refKey, 
"-t",  [...]
+                       g.Expect(KamelRunWithID(t, ctx, operatorID, ns, 
"files/PlatformHttpServer.java", "--resource", 
"secret:"+secretName+"@/etc/ssl/"+secretName, "-p", 
"quarkus.http.ssl.certificate.files=/etc/ssl/"+secretName+"/tls.crt", "-p", 
"quarkus.http.ssl.certificate.key-files=/etc/ssl/"+secretName+"/tls.key", "-t", 
"route.tls-termination=reencrypt", "-t", 
"route.tls-destination-ca-certificate-secret="+refCert, "-t", 
"route.tls-certificate-secret="+refCert, "-t", "route.tls-key-secret="+refKey, 
"-t" [...]
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
integrationName), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 
                        route := Route(t, ctx, ns, integrationName)

Reply via email to