question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

helm goal configuration appends ${project.artifactId} to home and sources

See original GitHub issue

Description

Documentation says:

home: The Chart URL for this project’s home page, which is ${project.url} if not provided. sources: The Chart list of URLs to source code for this project, defaults to the list of ${project.scm.url} if not provided.

But reality is that home is set to: ${project.url}/${project.artifactId} and sources to ${project.scm.url}/${project.artifactId}

Info

  • Eclipse JKube version : 1.0.0-rc-1
  • Maven version (mvn -v) : 3.6.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hlavkicommented, Aug 31, 2020

thanks @manusa for looking into this behaviour. Then it would be great to have some note about this (multi module project) in documentation.

1reaction
manusacommented, Aug 31, 2020

I don’t particularly see this as a JKube specific bug.

Solution 1

The first and easiest fix would be to complete your helm configuration:

<helm>
    <description>JKube #363</description>
    <home>https://jkube.example.com</home>
    <sources>
        <source>https://github.com/hlavki/jkube-363</source>
    </sources>
    <maintainers>
        <maintainer>
            <name>John Nhoj</name>
            <email>jon.nhoj@example.com</email>
        </maintainer>
    </maintainers>
</helm>

Solution 2

Maybe even with variables defined in the parent pom.xml

<properties>
    <java.version>11</java.version>
    <helm.home>${project.parent.url}</helm.home>
    <helm.source>${project.parent.scm.url}</helm.source>
</properties>

And configuration referencing those variables in assembly/pom.xml

<helm>
    <description>JKube #363</description>
    <home>${helm.home}</home>
    <sources>
        <source>${helm.source}</source>
    </sources>
    <maintainers>
        <maintainer>
            <name>John Nhoj</name>
            <email>jon.nhoj@example.com</email>
        </maintainer>
    </maintainers>
</helm>

Solution 3

Configure inheritance for URL and SCM elements as stated in MNG-6059 (requires newer Maven versions):

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
         child.project.url.inherit.append.path="false"
         >
<!-- ... -->
    <url>https://jkube.example.com</url>
    <scm child.scm.url.inherit.append.path="false">
        <connection>scm:git:ssh://git@github.com:hlavki/jkube-363.git</connection>
        <url>https://github.com/hlavki/jkube-363</url>
        <tag>HEAD</tag>
    </scm>
<!-- ... -->
</project>

All of the provided solutions will output the following Chart.yaml, just pick the one that suits you better 😉:

---
name: jkube-boot-multimodule-assembly
home: https://jkube.example.com
sources:
- https://github.com/hlavki/jkube-363
version: 1.0-SNAPSHOT
description: 'JKube #363'
maintainers:
- name: John Nhoj
  email: jon.nhoj@example.com

See also

Read more comments on GitHub >

github_iconTop Results From Across the Web

steven-sheehy/helm-maven-plugin-1: Simple plugin to ... - GitHub
This is a Maven plugin for testing, packaging and uploading HELM charts. "HELM is a tool for managing Kubernetes charts. Charts are packages...
Read more >
microbean-helm : 2.8.2.1.1.1 - Maven Central Repository Search
microBean Helm - Java bindings for the Helm API. ... Source code, https://github.com/microbean/${project.artifactId}/. Inception year, 2017 ...
Read more >
Kubernetes Maven Plugin - JKube - Eclipse
This goal is for creating Helm charts for your Maven project so that you can ... values for home and sources will get...
Read more >
Install Helm Charts Using This Maven Plugin - Austin Dewey
The helm:upgrade goal is invoked automatically during Maven's install lifecycle phase. This goal installs a Helm chart to Kubernetes or upgrades ...
Read more >
Tutorial: Create, Build, and Deploy a Spring Boot Application ...
The goal of this tutorial is to create a simple Java Spring Boot application deployed in Kubernetes, using Helm charts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found