tdiesler opened a new issue, #5546:
URL: https://github.com/apache/camel-k/issues/5546
```
kubectl create secret generic http-keystore --from-file keystore.jks
kubectl create secret generic http-truststore --from-file truststore.jks
kamel run --dev \
-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 \
NettySecureServer.java
[1] Caused by: org.apache.camel.RuntimeCamelException: java.io.IOException:
Could not open /etc/ssl/keystore.jks as a file, class path resource, or URL.
[1] at
org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:51)
[1] at
org.apache.camel.component.netty.http.HttpServerInitializerFactory.<init>(HttpServerInitializerFactory.java:67)
[1] at
org.apache.camel.component.netty.http.NettyHttpComponent.newHttpServerBootstrapFactory(NettyHttpComponent.java:352)
[1] at
org.apache.camel.component.netty.http.NettyHttpComponent.lambda$getOrCreateHttpNettyServerBootstrapFactory$1(NettyHttpComponent.java:344)
[1] at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)
[1] at
org.apache.camel.component.netty.http.NettyHttpComponent.getOrCreateHttpNettyServerBootstrapFactory(NettyHttpComponent.java:344)
[1] at
org.apache.camel.component.netty.http.NettyHttpEndpoint.createConsumer(NettyHttpEndpoint.java:98)
[1] at
org.apache.camel.impl.engine.DefaultRoute.gatherRootServices(DefaultRoute.java:640)
[1] at
org.apache.camel.impl.engine.DefaultRoute.gatherServices(DefaultRoute.java:624)
[1] at
org.apache.camel.impl.engine.DefaultRoute.initializeServices(DefaultRoute.java:209)
[1] at
org.apache.camel.impl.engine.RouteService.doSetup(RouteService.java:150)
[1] at
org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:129)
[1] ... 28 more
[1] Caused by: java.io.IOException: Could not open /etc/ssl/keystore.jks as
a file, class path resource, or URL.
[1] at
org.apache.camel.support.jsse.JsseParameters.resolveResource(JsseParameters.java:120)
[1] at
org.apache.camel.support.jsse.KeyStoreParameters.createKeyStore(KeyStoreParameters.java:192)
[1] at
org.apache.camel.support.jsse.KeyManagersParameters.createKeyManagers(KeyManagersParameters.java:102)
[1] at
org.apache.camel.support.jsse.SSLContextParameters.createSSLContext(SSLContextParameters.java:269)
[1] at
org.apache.camel.component.netty.http.HttpServerInitializerFactory.createSSLContext(HttpServerInitializerFactory.java:150)
[1] at
org.apache.camel.component.netty.http.HttpServerInitializerFactory.<init>(HttpServerInitializerFactory.java:65)
[1] ... 38 more
```
From within the container, I can access those files
```
root@netty-server-75cfcb58d-wlnb8:/deployments# keytool -list -keystore
/etc/ssl/keystore.jks
Enter keystore password:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
entryname, May 23, 2024, PrivateKeyEntry,
Certificate fingerprint (SHA-256):
06:69:0B:F0:8C:DA:42:19:19:36:08:F8:96:30:D8:C1:1E:22:BB:FC:BF:24:8E:F5:2A:1F:2F:65:F6:B3:B7:B9
root@netty-server-75cfcb58d-wlnb8:/deployments# keytool -list -keystore
/etc/ssl/truststore.jks
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
entryname, May 23, 2024, trustedCertEntry,
Certificate fingerprint (SHA-256):
06:69:0B:F0:8C:DA:42:19:19:36:08:F8:96:30:D8:C1:1E:22:BB:FC:BF:24:8E:F5:2A:1F:2F:65:F6:B3:B7:B9
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]