christophd opened a new issue, #5289:
URL: https://github.com/apache/camel-k/issues/5289

   ### What happened?
   
   The IntegrationPlatform spec is able to hold build configuration settings 
that should be applied to the integration image builds. However, some settings 
are ignored when set on the IntegrationPlatform (e.g. 
`build.buildConfiguration.platforms`).
   
   Status of the Integration platform after adding the setting:
   ```yaml
   #...
     status:
       build:
         baseImage: arm64v8/eclipse-temurin:17
         buildConfiguration:
           orderStrategy: sequential
           platforms:
           - linux/amd64
           - linux/arm64
           strategy: routine
   #...
   ```
   
   I would expect the operator to use a setting 
`-Djib.from.platforms=linux/arm64` but it is not there (see logs below).
   
   When the platform is set via trait option on the integration (`kamel run 
simple.groovy -t builder.platforms="linux/arm64"`) it works and I can see the 
setting `-Djib.from.platforms=linux/arm64` is being used during the integration 
image build as expected.
   
   Users should be able to set this also on IntegrationPlatform level for all 
integrations.
   
   ### Steps to reproduce
   
   1. Install Camel K 2.3.0-SNAPSHOT
   2. patch the IntegrationPlatform to add build configuration (`k patch itp 
camel-k --type=merge -p '{"spec":{"build": { "buildConfiguration": 
{"platforms": ["linux/amd64","linux/arm64"]}}}}'`)
   3. Review the integration platform status to have the setting applied
   4. run integration and review the operator log to use the setting 
`-Djib.from.platforms=linux/arm64` during the build
   
   ### Relevant log output
   
   ```shell
   
{"level":"info","ts":"2024-03-27T08:49:31Z","logger":"camel-k.maven.build","msg":"Executed
 command: ./mvnw jib:build -V --no-transfer-progress -Dstyle.color=never 
-Dmaven.repo.local=/etc/maven/m2 --global-settings 
/tmp/kit-co1tqo3ui44s7386ui00-557093953/maven/settings.xml 
-Dmaven.artifact.threads=4 -T 4 -P jib 
-Djib.to.image=10.96.46.247/camel-system/camel-k-kit-co1tqo3ui44s7386ui00:39034 
-Djib.from.image=arm64v8/eclipse-temurin:17 -Djib.allowInsecureRegistries=true"}
   ```
   
   
   ### Camel K version
   
   2.3.0-SNAPSHOT


-- 
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]

Reply via email to