[
https://issues.apache.org/jira/browse/CAMEL-21751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Diesler resolved CAMEL-21751.
------------------------------------
Resolution: Abandoned
can be fixed by using run-java.sh
> camel-jbang k8s cannot add trusted cert to image
> ------------------------------------------------
>
> Key: CAMEL-21751
> URL: https://issues.apache.org/jira/browse/CAMEL-21751
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Priority: Major
>
> I have a plugin configuration like this ...
> {code:xml}
> <plugin>
> <groupId>org.eclipse.jkube</groupId>
> <artifactId>kubernetes-maven-plugin</artifactId>
> <version>1.18.1</version>
> <configuration>
> <buildStrategy>docker</buildStrategy>
> <images>
> <image>
> <build>
> <from>eclipse-temurin:17</from>
> <entryPoint>
> <exec>
> <arg>__cacert_entrypoint.sh</arg>
> <arg>java</arg>
> <arg>-jar</arg>
>
> <arg>/maven/${project.artifactId}-${project.version}.jar</arg>
> </exec>
> </entryPoint>
> <assembly>
> <layers>
> <layer>
> <id>trusted-certs</id>
> <fileSets>
> <fileSet>
>
> <directory>src/main/certs</directory>
>
> <outputDirectory>/tmp</outputDirectory>
> <includes>
>
> <include>*crt</include>
> </includes>
> </fileSet>
> </fileSets>
> </layer>
> </layers>
> </assembly>
> </build>
> </image>
> </images>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>build</goal>
> <goal>resource</goal>
> <goal>push</goal>
> </goals>
> <phase>package</phase>
> </execution>
> </executions>
> </plugin>
> {code}
> and get
> {code}
> [INFO] k8s: [examples/platform-http-oauth:1.0.0]: Created docker-build.tar in
> 86 milliseconds
> [INFO] k8s: Step 1/4 : FROM eclipse-temurin:17
> [INFO] k8s:
> [INFO] k8s: ---> 1e83e0efd1de
> [INFO] k8s: Step 2/4 : COPY /trusted-certs/maven /maven/
> [INFO] k8s:
> [ERROR] k8s: Failed to execute the build [Error while trying to build the
> image: Unable to build image [examples/platform-http-oauth:1.0.0] : "COPY
> failed: file not found in build context or excluded by .dockerignore: stat
> trusted-certs/maven: file does not exist" ]
> {code}
> or
> {code}
> [ERROR] k8s: Failed to execute the build [Error while trying to build the
> image: Cannot create directory '/certificates'.]
> {code}
> CrossRef: https://github.com/eclipse-jkube/jkube/issues/3672
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)