[ 
https://issues.apache.org/jira/browse/CAMEL-21007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868099#comment-17868099
 ] 

Thomas Diesler edited comment on CAMEL-21007 at 7/23/24 3:30 PM:
-----------------------------------------------------------------

Done as part of CAMEL-20990


was (Author: tdiesler):
Done in https://issues.apache.org/jira/browse/CAMEL-20990

> camel-jbang: Find a way to build a multiarch image with jkube
> -------------------------------------------------------------
>
>                 Key: CAMEL-21007
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21007
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Thomas Diesler
>            Priority: Major
>
> Currently we build a multiarch image like this ...
> {code}
>             <plugin>
>                 <groupId>com.google.cloud.tools</groupId>
>                 <artifactId>jib-maven-plugin</artifactId>
>                 <version>${camel.springboot.jib.version}</version>
>                 <configuration>
>                     <from>
>                         <image>eclipse-temurin:17</image>
>                         <platforms>
>                             <platform>
>                                 <architecture>amd64</architecture>
>                                 <os>linux</os>
>                             </platform>
>                             <platform>
>                                 <architecture>arm64</architecture>
>                                 <os>linux</os>
>                             </platform>
>                         </platforms>
>                     </from>
>                     <to>
>                         
> <image>${camel.springboot.kubernetes.image-name}</image>
>                     </to>
>                     <allowInsecureRegistries>true</allowInsecureRegistries>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>dockerBuild</goal>
>                         </goals>
>                         <phase>package</phase>
>                     </execution>
>                 </executions>
>             </plugin>
> {code}
> and later reference it in JKube like this ...
> {code}
>             <plugin>
>                 <groupId>org.eclipse.jkube</groupId>
>                 <artifactId>kubernetes-maven-plugin</artifactId>
>                 <version>${camel.springboot.jkube.version}</version>
>                 <configuration>
>                     
> <imagePullPolicy>${camel.springboot.kubernetes.image-pull-policy}</imagePullPolicy>
>                     <buildStrategy>jib</buildStrategy>
>                     <images>
>                         <image>
>                             
> <name>${camel.springboot.kubernetes.image-name}</name>
>                         </image>
>                     </images>
>                     <resources>
>                         <labels>
>                             <all>
>                                 <property>
>                                     <name>camel.apache.org/integration</name>
>                                     <value>${project.artifactId}</value>
>                                 </property>
>                                 <property>
>                                     <name>app.kubernetes.io/runtime</name>
>                                     <value>camel</value>
>                                 </property>
>                             </all>
>                         </labels>
>                     </resources>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>resource</goal>
>                         </goals>
>                         <phase>package</phase>
>                     </execution>
>                 </executions>
>             </plugin>
> {code}
> We also need to explicitly set property `jkube.generator.name`, otherwise 
> kubernetes.yml may not reference the correct image name.
> Perhaps this would better all be done by the JKube plugin



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to