Skip to content

Provide a way to set labels on images defined by Generators #2885

@davidecavestro

Description

@davidecavestro

Component

Kubernetes Maven Plugin

Is your enhancement related to a problem? Please describe

I miss a way to set labels on the container image when I build it through generators (instead of the images config). I use the spring-boot generator, but I suppose the issue is common to others.

Describe the solution you'd like

I'd like to add a labels entry to the generator config, such as

...
<generator>
  <config>
    <spring-boot>
      <color>always</color>
      <from>...</from>
      <labels>foo=abc,bar=123</labels><!-- with a CSV or nested elems -->
    </spring-boot>
  </config>
</generator>
...

Probably a comma separated list of values would resemble what already happens for jkube.generator.tags.

Describe alternatives you've considered

Using images tag or dockerfile I would loose the support for automatic detection of layered jars

Additional context

Discussed at #2884

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions