tdiesler commented on PR #5403:
URL: https://github.com/apache/camel-k/pull/5403#issuecomment-2098050371

   I now set `platform.Status.Build.BuildConfiguration.ImagePlatforms` like 
[this](https://github.com/tdiesler/camel-k/blob/ghi5292/pkg/cmd/install.go#L599)
 on `kamel install`
   
   ```
        if platform.Status.Build.BuildConfiguration.ImagePlatforms == nil {
                buildConfig := &platform.Status.Build.BuildConfiguration
                if runtime.GOARCH == "arm64" {
                        buildConfig.ImagePlatforms = []string{"linux/arm64"}
                }
        }
   ```
   
   Later in jib.go, I try to read out that parameter like 
[this](https://github.com/tdiesler/camel-k/blob/ghi5292/pkg/builder/jib.go#L116)
   
   ```
        // If not explicitly configured otherwise, we build the integration for 
the arch configured in the IntegrationPlatform.
        // Building the integration for multiarch is deferred until the next 
major version (e.g. 3.x)
        var imagePlatforms []string
        if t.task.Configuration.ImagePlatforms != nil {
                imagePlatforms = t.task.Configuration.ImagePlatforms
        } else {
                if ip, _ := platform.GetForName(ctx, t.c, t.build.Namespace, 
platform.DefaultPlatformName); ip != nil {
                        buildConfig := ip.Status.Build.BuildConfiguration
                        imagePlatforms = buildConfig.ImagePlatforms
                        log.Infof(">>>")
                        log.Infof(">>> IntegrationPlatform: %v", ip)
                        log.Infof(">>>")
                        log.Infof(">>> BuildConfiguration: %v", buildConfig)
                        log.Infof(">>>")
                        log.Infof(">>> ImagePlatforms: %v", imagePlatforms)
                }
        }
   ```
   
   The expected `platform.Status.Build.BuildConfiguration.ImagePlatforms` is 
always empty. I verified that this property is part of deep copy. What else 
could be missing or needs checking?


-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to