eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
733 stars 480 forks source link

Helm lint complains about missing `icon` attribute on generated helm chart #2478

Open ajeans opened 9 months ago

ajeans commented 9 months ago

Component

Kubernetes Maven Plugin

Is your enhancement related to a problem? Please describe

k8s:helm generates a helm file that helm lint complains about.

  1. Clone the jkube project ;-)
  2. Build the helm file of one of the quickstarts
    cd quickstarts/maven/spring-boot-helm
    mvn clean install
    mvn k8s:resource k8s:helm
  3. And lint the generated helm file
    helm lint target/jkube/helm/spring-boot-helm/kubernetes/spring-boot-helm-1.15.0.tar.gz
    
    ==> Linting target/jkube/helm/spring-boot-helm/kubernetes/spring-boot-helm-1.15.0.tar.gz
    [INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed


It is possible to workaround this warning by forcing the icon attribute in `src/main/jkube/Chart.helm.yml`

```yaml
# Our own custom icon - makes 'helm lint' happy
icon: https://fr.shopping.rakuten.com/visuels/0_content_square/autres/rakuten-logo6.svg

Describe the solution you'd like

Add a default value for icon.

Maybe a link to the JKube icon?

Describe alternatives you've considered

No response

Additional context

No response

manusa commented 9 months ago

I'm not really sure that we should prescribe an icon. The linter is logging an info message with a suggestion.

We should check what other tools are doing (are they presrcribing an icon? what's the URL of the icon? and so on) and then make a decision about to provide a default value or not.

ajeans commented 9 months ago

Hello @manusa

Yes that is debatable, this is indeed only an INFO message.

helm create foo

generates the following default chart

apiVersion: v2
name: foo
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

No iconthere, so at least jkube would be consistent with it.