davsclaus opened a new pull request, #23804:
URL: https://github.com/apache/camel/pull/23804

   ## Summary
   
   - Fix Knative Service manifest getting a bare image name (e.g., 
`http-log:1.0-SNAPSHOT`) instead of the full registry URL when deploying to 
OpenShift with `--trait knative-service.enabled=true`
   - Root cause: commit `089356d392b5` (CAMEL-21903) stopped setting the 
container image on the Container trait, only setting JKube build properties. 
This works for Deployments (JKube reads the properties), but breaks Knative 
Services (generated entirely by traits code, not JKube)
   
   ## Root Cause
   
   `TraitHelper.configureContainerImage()` sets `jkube.image.name` and 
`jkube.container-image.name` as Maven build properties but no longer calls 
`containerTrait.setImage(imageToUse)`. Since `ContainerTrait.apply()` only sets 
the image on the container when `containerTrait.getImage()` is not empty, the 
Knative Service ends up with no image reference — Knative then resolves the 
bare artifact name against Docker Hub and fails with 401 Unauthorized.
   
   ## Fix
   
   Re-add `containerTrait.setImage(imageToUse)` in 
`TraitHelper.configureContainerImage()` so both Deployments and Knative 
Services get the correct image. The JKube build properties remain as-is for 
Maven CI/CD overridability.
   
   ## Test plan
   
   - [x] Updated all `KubernetesExportTest` assertions from 
`assertNull(container.getImage())` to expect the correct image value
   - [x] All existing tests pass
   
   _Claude Code on behalf of Claus Ibsen_


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