New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeploymentConfig ImageChange trigger seems to be wrong for custom images #904
Comments
When I was trying to reproduce this issue, Due to image name being set to In Fabric8 Maven Plugin, In ResourceMojo, there is a lateInit method which seems to be setting This property seems to be read from ImageNameFormatter, note that what's being read is I think we have a typo in ResourceMojo, we should update this property to match the one being read in ImageNameFormatter. I'll create a PR to fix this. |
According to OpenShift documentation, If I remove this namespace set line from ImageChangeTriggerEnricher, I can see that in triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- orgeclipsejkubequickstartsmaven-quarkus-customized-image
from:
kind: ImageStreamTag
name: quarkus-customized-image:latest
type: ImageChange But after issuing triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- orgeclipsejkubequickstartsmaven-quarkus-customized-image
from:
kind: ImageStreamTag
name: quarkus-customized-image:latest
namespace: rokumar-dev
lastTriggeredImage: image-registry.openshift-image-registry.svc:5000/rokumar-dev/quarkus-customized-image@sha256:a080942a695f6c29ebe4d2b98d294bdd41124000d97ea7066ff3078c4fe07645
type: ImageChange I have tested with both |
Right now `%g` placeholder which corresponds to default image user picks `jkube.image.user` property first, if not then project groupId. Due to a typo in ResourceMojo for DOCKER_IMAGE_USER property, wrong property was being set in mojo. Relates to eclipse-jkube#904 Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…be wrong for custom images Setting from.namespace field from image.getUser() can be problematic if it's not equal to the namespace. If it's set to `%g`, it will work since JKube will evaluate to current configured namespace but if user defines image name to have a different user then ImageChangeTrigger would be configured with a non-existent namespace. Don't set from.namespace field for ImageChangeTrigger while adding ImageChangeTrigger to DeploymentConfig Signed-off-by: Rohan Kumar <rohaan@redhat.com>
OK, let's remove it then. If there's a regression we can always set it back since the correct behavior is fixed in #910 (as long as the user is providing Updated documentation for 4.8 https://docs.openshift.com/container-platform/4.8/rest_api/workloads_apis/deploymentconfig-apps-openshift-io-v1.html |
Right now `%g` placeholder which corresponds to default image user picks `jkube.image.user` property first, if not then project groupId. Due to a typo in ResourceMojo for DOCKER_IMAGE_USER property, wrong property was being set in mojo. Relates to #904 Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…custom images Setting from.namespace field from image.getUser() can be problematic if it's not equal to the namespace. If it's set to `%g`, it will work since JKube will evaluate to current configured namespace but if user defines image name to have a different user then ImageChangeTrigger would be configured with a non-existent namespace. Don't set from.namespace field for ImageChangeTrigger while adding ImageChangeTrigger to DeploymentConfig Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Description
The following statements sets the namespace of the change trigger to the image user. This seems to be an issue for custom images which include the repository/user/group information.
https://github.com/eclipse/jkube/blob/682cc6f25ccf3e95e20832d1396fa3890f3a4e26/jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/openshift/ImageChangeTriggerEnricher.java#L98
You can easily reproduce this with quickstarts/maven/quarkus-customized-image.
The text was updated successfully, but these errors were encountered: