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

Add Support for specifying multiple tags in Zero Configuration mode #1188

Closed
rohanKanojia opened this issue Dec 24, 2021 · 3 comments · Fixed by #1462
Closed

Add Support for specifying multiple tags in Zero Configuration mode #1188

rohanKanojia opened this issue Dec 24, 2021 · 3 comments · Fixed by #1462
Assignees
Labels
demoable Issues which can be demoed during the Sprint review meeting enhancement New feature or request
Milestone

Comments

@rohanKanojia
Copy link
Member

Description

This was originally suggested by @kameshsampath in chat. I'm just creating an issue about it for reference.

Right now if user wants to provide multiple tags on container image during build/push goals. He has to provide full image configuration like this:

            <plugin>
                <groupId>org.eclipse.jkube</groupId>
                <artifactId>kubernetes-maven-plugin</artifactId>
                <version>${jkube.version}</version>
                <configuration>
                  <images>
                    <image>
                      <name>${docker.user}/random-generator:${project.version}</name>
                      <build>
                        <from>quay.io/jkube/jkube-java-binary-s2i:0.0.10</from>
                        <assembly>
                        </assembly>
                        <tags>
                          <tag>${project.version}</tag>
                          <tag>latest</tag>
                        </tags>
                      </build>
                    </image>
                  </images>
                </configuration>
            </plugin>

It would be nice if we could support specifying multiple tags in zero-configuration mode via specifying some property.

I think we can implement this via adding a configuration option in BaseGenerator about comma-separated tags string:

https://github.com/eclipse/jkube/blob/bdfb00e1b02a7cbd84723ccf24a7413f940b4ebd/jkube-kit/generator/api/src/main/java/org/eclipse/jkube/generator/api/support/BaseGenerator.java#L59-L64

this configuration can be parsed later and tags can be added to BuildConfiguration builder, like latest tag is added for -SNAPSHOT versions here:

https://github.com/eclipse/jkube/blob/bdfb00e1b02a7cbd84723ccf24a7413f940b4ebd/jkube-kit/generator/api/src/main/java/org/eclipse/jkube/generator/api/support/BaseGenerator.java#L224

If we do this user would be able to specify multiple tags by just specifying generator config as property:

<jkube.generator.spring-boot.tags>tag1,tag2</jkube.generator.spring-boot.tags>

Info

  • Eclipse JKube version : 1.5.1
  • Maven version (mvn -v) :
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /opt/apache-maven
Java version: 11.0.11, vendor: Oracle Corporation, runtime: /usr/java/jdk-11.0.11
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.7-200.fc35.x86_64", arch: "amd64", family: "unix"
  • Kubernetes / Red Hat OpenShift setup and version : N/A

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

  • If it's a feature request, what is your use case : Allow specifying multiple tags on opinionated images

  • Sample Reproducer Project : N/A

@manusa manusa added the enhancement New feature or request label Dec 24, 2021
@manusa manusa added this to the 1.x milestone Apr 5, 2022
@sunix sunix added the demoable Issues which can be demoed during the Sprint review meeting label Apr 11, 2022
@rohanKanojia rohanKanojia self-assigned this Apr 20, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Apr 20, 2022
…r to add tags (eclipse-jkube#1188)

Right now there isn't a way to add tags to BuildConfiguration while
using zero config mode in generators. Adding a configuration field in
BaseGenerator which would expect comma separated tags which can be
picked up by Generator while building opinionated Image configuration

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Apr 22, 2022
…r to add tags (eclipse-jkube#1188)

Right now there isn't a way to add tags to BuildConfiguration while
using zero config mode in generators. Adding a configuration field in
BaseGenerator which would expect comma separated tags which can be
picked up by Generator while building opinionated Image configuration

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@manusa manusa modified the milestones: 1.x, 1.8.0 Apr 27, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue May 4, 2022
…r to add tags (eclipse-jkube#1188)

Right now there isn't a way to add tags to BuildConfiguration while
using zero config mode in generators. Adding a configuration field in
BaseGenerator which would expect comma separated tags which can be
picked up by Generator while building opinionated Image configuration

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue May 6, 2022
…r to add tags (eclipse-jkube#1188)

Right now there isn't a way to add tags to BuildConfiguration while
using zero config mode in generators. Adding a configuration field in
BaseGenerator which would expect comma separated tags which can be
picked up by Generator while building opinionated Image configuration

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit that referenced this issue May 6, 2022
…r to add tags (#1188)

Right now there isn't a way to add tags to BuildConfiguration while
using zero config mode in generators. Adding a configuration field in
BaseGenerator which would expect comma separated tags which can be
picked up by Generator while building opinionated Image configuration

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

thanks @rohanKanojia @manusa for adding this :)

@manusa
Copy link
Member

manusa commented May 7, 2022

thanks @rohanKanojia @manusa for adding this :)

Nice to read you :)

I'm not sure if you're still using JKube, but Your feedback is very good, and you know we really appreciate it.
If you think of any other missing features or enhancements, please don't hesitate to reach out to us ;)

@kameshsampath
Copy link

kameshsampath commented May 7, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demoable Issues which can be demoed during the Sprint review meeting enhancement New feature or request
Projects
None yet
4 participants