diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 3076642..d2ccbfe 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -1,5 +1,11 @@
= Changelog
+== Unreleased
+
+== Version 2.9.0
+
+* Support configuring the default URL of the helm repository for helm 2.x via `stableRepoUrl`
+
== Version 2.8.1
* Fix detection of aarch64/arm64 architecture
@@ -20,7 +26,7 @@
== Version 2.6.0
* If the package can't resolve a property an exception is no longer thrown. This behaviour is now logged with a
- warning and the packaging mojo continues.
+ warning, and the packaging mojo continues.
== Version 2.5.1
diff --git a/README.adoc b/README.adoc
index dda5422..543fb2b 100644
--- a/README.adoc
+++ b/README.adoc
@@ -20,10 +20,10 @@ Add the following to your `pom.xml`
com.deviceinsight.helm
helm-maven-plugin
- 2.8.1
+ 2.9.0
my-chart
- https://kubernetes-charts.storage.googleapis.com/
+ https://charts.helm.sh/stable
3.4.2
true
src/test/helm/my-chart/values.yaml
@@ -91,9 +91,10 @@ that the correct docker image is used. An example snippet:
|skipSnapshots |`true` |If true, SNAPSHOT versions will be built, but not deployed.
|helmGroupId |`"com.deviceinsight.helm"` |The helm binary `groupId`
|helmArtifactId |`"helm"` |The helm binary `artifactId`
-|helmVersion |None |The helm binary `version`
+|helmVersion |None |The helm binary `version`. (Make sure to use a recent helm binary version that doesn't use the old Helm Chart repositories from `+https://kubernetes-charts.storage.googleapis.com+`, >= 3.4.0 _or_ >= 2.17.0 if you are still using Helm 2)
|helmDownloadUrl |`"https://get.helm.sh/"` |The URL where the helm binary is downloaded from.
|helm.skip |`false` |If true, execution will be skipped entirely
+|stableRepoUrl | `"https://charts.helm.sh/stable"` | For helm 2.x: Can be used to overwrite the default URL for stable repository during `helm init`
|strictLint |`false` |If true, linting fails on warnings (see: <>)
|valuesFile | None | values file that should be used for goals <>, <>
|outputFile | target/test-classes/helm.yaml | output file for <>
@@ -140,32 +141,54 @@ To use the `deployAtEnd` functionality it's mandatory to put the Helm Maven Plug
...
- com.deviceinsight.helm
- helm-maven-plugin
- 2.1.0
-
- my-chart
- https://kubernetes-charts.storage.googleapis.com/
- 2.13.0
- true
- src/test/helm/my-chart/values.yaml
- true
-
-
-
-
- package
- lint
- template
- deploy
-
-
-
-
+ com.deviceinsight.helm
+ helm-maven-plugin
+ 2.9.0
+
+ my-chart
+ https://charts.helm.sh/stable
+ 3.4.2
+ true
+ src/test/helm/my-chart/values.yaml
+ true
+
+
+
+
+ package
+ lint
+ template
+ deploy
+
+
+
+
....
+== Troubleshooting
+
+. {blank}
+Problem:: The following error message is a common source of trouble, lately:
++
+----
+[ERROR] Output: Error: error initializing: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden
+
+...
+
+[ERROR] Failed to execute goal com.deviceinsight.helm:helm-maven-plugin:2.9.0:package (default) on project my-project: Error creating helm chart: When executing '/home/user/.m2/repository/com/deviceinsight/helm/helm/2.16.2/helm-2.16.2-linux-amd64.binary init --client-only' got result code '1' -> [Help 1]
+----
+Solution:: This is likely due to an old version of helm itself. Make sure to configure `` to a version >= 3.4.0 or, if you are still using Helm 2, a version >= 2.17.0 (https://github.com/helm/charts#%EF%B8%8F-deprecation-and-archive-notice[background information]).
+. {blank}
++
+Problem:: The following error message appears if you use an old version of helm-maven-plugin:
++
+----
+[ERROR] Output: Error: error initializing: Looks like "https://kubernetes-charts-incubator.storage.googleapis.com" is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts-incubator.storage.googleapis.com/index.yaml : 403 Forbidden
+----
+Solution:: This can be solved by upgrading helm-maven-plugin itself to version 2.7.0 or later (https://github.com/deviceinsight/helm-maven-plugin/issues/67[#67]).
+
== Releasing
Creating a new release involves the following steps:
diff --git a/pom.xml b/pom.xml
index b46ebf2..0d375a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.deviceinsight.helm
helm-maven-plugin
- 2.8.1
+ 2.9.0
maven-plugin
Helm Maven Plugin
@@ -20,9 +20,9 @@
3.6.0
2.2.1
- 0.12.0
+ 0.13.1
- 2.12.0
+ 2.12.1
4.5.13
5.7.0
@@ -31,7 +31,7 @@
1.4.20
3.8.1
3.2.1
- 1.15.0
+ 1.15.1
1.6.8
1.6
diff --git a/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt b/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt
index 7642276..1ed3621 100644
--- a/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt
+++ b/src/main/kotlin/com/deviceinsight/helm/PackageMojo.kt
@@ -48,6 +48,9 @@ class PackageMojo : AbstractHelmMojo() {
@Parameter(property = "incubatorRepoUrl", defaultValue = "https://charts.helm.sh/incubator")
private var incubatorRepoUrl: String = "https://charts.helm.sh/incubator"
+ @Parameter(property = "stableRepoUrl", defaultValue = "https://charts.helm.sh/stable")
+ private var stableRepoUrl: String = "https://charts.helm.sh/stable"
+
@Parameter(property = "addIncubatorRepo", defaultValue = "true")
private var addIncubatorRepo: Boolean = true
@@ -80,7 +83,7 @@ class PackageMojo : AbstractHelmMojo() {
processHelmConfigFiles(targetHelmDir)
if (majorHelmVersion() < 3) {
- executeCmd("$helm init --client-only")
+ executeCmd("$helm init --client-only --stable-repo-url $stableRepoUrl")
}
if (addIncubatorRepo) {