Skip to content
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

Additional image tags issue #1411

Closed
Surfjoan opened this issue Mar 30, 2022 · 5 comments · Fixed by #1639
Closed

Additional image tags issue #1411

Surfjoan opened this issue Mar 30, 2022 · 5 comments · Fixed by #1639
Assignees
Labels
question Further information is requested
Milestone

Comments

@Surfjoan
Copy link

Surfjoan commented Mar 30, 2022

Description

Info

  • Eclipse JKube version: 1.7.0

  • Maven version (mvn -v): 3.5.4

  • Kubernetes / Red Hat OpenShift setup and version: Openshift v3.11

  • If it's a bug, how to reproduce:

  • I have set the name element to this <name>${namespace}/%a:%v</name> but want to add an additional tag on the image in openshift after it is built. So i added the <tags><tag>my-tag</tag></tags> elements to the plugin configuration in pom. According to documentation this is the way to add additional tags to the image after it is being built. But no additional tags are created. Or am i misunderstanding the purpose of the element?

  • If it's a feature request, what is your use case :

  • Sample Reproducer Project : [GitHub Clone URL]

@manusa manusa added the question Further information is requested label Apr 4, 2022
@manusa
Copy link
Member

manusa commented Apr 4, 2022

That's the purpose of these elements (tags,tag). Could you please share a reproducer pom.xml so we can see where the problem is?

@manusa manusa added the Waiting on feedback Issues that require feedback from User/Other community members label Apr 4, 2022
@Surfjoan
Copy link
Author

Surfjoan commented Apr 5, 2022

Enough with plugin conf?

            <plugin>
                <groupId>org.eclipse.jkube</groupId>
                <artifactId>openshift-maven-plugin</artifactId>
                <version>1.7.0</version>
                <configuration>
                    <images>
                        <image>
                            <name>${openshiftnamespace}/%a:%v</name>
                            <build>
                                <fromExt>
                                    <name>${openshift-base-image}</name>
                                    <namespace>${image-namespace}</namespace>
                                    <kind>ImageStreamTag</kind>
                                </fromExt>
                                <env>
                                    <JAVA_APP_DIR>/deployments</JAVA_APP_DIR>
                                </env>
                                <tags>
                                    <tag>%v</tag>
                                    <tag>latest</tag>
                                </tags>
                            </build>
                        </image>
                    </images>
                </configuration>
            </plugin>

@manusa manusa removed the Waiting on feedback Issues that require feedback from User/Other community members label Apr 27, 2022
@rohanKanojia
Copy link
Member

But no additional tags are created.

@Surfjoan : by tags, are you referring to ImageStreamTags ?

Looking at code in OpenShiftBuildService I don't think we support creating multiple ImageStreamTags at the moment. But we can refactor this to support your use case.

Without the plugin, how do you configure BuildConfig to create multiple ImageStreamTags as build output? Or do you do oc tag after build for your additional tags?

@rohanKanojia rohanKanojia self-assigned this Jun 28, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jun 29, 2022
…ultiple tags specified in Image Build Configuration (eclipse-jkube#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jun 29, 2022
…ultiple tags specified in Image Build Configuration (eclipse-jkube#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia
Copy link
Member

@Surfjoan : I've created a PR #1639 that creates ImageStreamTags based on tags specified in <build><tags> section (similar to what we do with oc tag ... command) . Does this align with your expectations? Would be awesome if you could provide some feedback regarding this.

@Surfjoan
Copy link
Author

Surfjoan commented Jul 2, 2022 via email

rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 12, 2022
…ultiple tags specified in Image Build Configuration (eclipse-jkube#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 18, 2022
…ultiple tags specified in Image Build Configuration (eclipse-jkube#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@manusa manusa added this to the 1.9.0 milestone Jul 22, 2022
manusa pushed a commit that referenced this issue Jul 22, 2022
…ultiple tags specified in Image Build Configuration (#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
baruKreddy pushed a commit to baruKreddy/jkube that referenced this issue Aug 11, 2022
…ultiple tags specified in Image Build Configuration (eclipse-jkube#1411)

Add support for adding multiple ImageStreamTags specified in
`tags` section of image's `build` configuration. After S2I build new
ImageStreamTags as specified in build configuration would get created.
They would point to same image as done by orignal ImageStreamTag output
of S2I build.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
3 participants