-
Notifications
You must be signed in to change notification settings - Fork 528
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
JavaExecGenerator does not honor %t setting #3161
Comments
@ecausarano : Is it possible to share a reproducer project? I tried reproducing this but could not reproduce the issue. Here are the steps I followed:
I was able to see image being tagged with timestamp:
|
okay, I think I now understand the problem now. Image is correctly tagged with timestamp, however JKube is adding an additional
This Lines 237 to 240 in cb683ea
Adding a check here to not add - if (getProject().getVersion().endsWith("-SNAPSHOT")) {
+ if (getProject().getVersion().endsWith("-SNAPSHOT") && !getImageName().contains("%t")) { |
That would fix it, but the tag name is already processed in another part of the codebase. (ImageNameFormatter.java I'm no Docker guru, is there a reason for explicitly adding the |
I'm checking history of this change and it seems to have been introduced in fabric8io/fabric8-maven-plugin#186 . It doesn't provide much insight on why this was added. |
Describe the bug
When setting the image name to
%t
in order to create a different tag when pushing to the container registy, the JavaExecGenerator will add its ownlatest
tag regardless.This breaks tagging to immutable repositories, where
latest
tags make no sense and will cause the push to fail.Eclipse JKube version
1.16.2
Component
Kubernetes Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
Choose
%t
in the image name configurationConfigure the target repository to be immutable (eg. AWS ECR)
Try to push
Expected behavior
The plugin should only attempt to add the timestamped tag, no
latest
tags added.Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
Amazon
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: