{"id":23286710,"url":"https://github.com/deviceinsight/helm-maven-plugin","last_synced_at":"2025-08-21T17:32:29.736Z","repository":{"id":37952049,"uuid":"165048871","full_name":"deviceinsight/helm-maven-plugin","owner":"deviceinsight","description":"Maven Plugin for Helm Charts","archived":false,"fork":false,"pushed_at":"2024-03-06T14:47:07.000Z","size":445,"stargazers_count":45,"open_issues_count":17,"forks_count":22,"subscribers_count":18,"default_branch":"develop","last_synced_at":"2024-07-26T15:59:40.285Z","etag":null,"topics":["helm","kubernetes","maven-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deviceinsight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-01-10T11:35:44.000Z","updated_at":"2024-05-08T05:22:59.000Z","dependencies_parsed_at":"2024-03-06T14:06:10.424Z","dependency_job_id":null,"html_url":"https://github.com/deviceinsight/helm-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviceinsight%2Fhelm-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviceinsight%2Fhelm-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviceinsight%2Fhelm-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviceinsight%2Fhelm-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deviceinsight","download_url":"https://codeload.github.com/deviceinsight/helm-maven-plugin/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230523699,"owners_count":18239447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helm","kubernetes","maven-plugin"],"created_at":"2024-12-20T02:14:09.237Z","updated_at":"2024-12-20T02:14:10.257Z","avatar_url":"https://github.com/deviceinsight.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helm Maven Plugin\n\n[![Java CI with Maven](https://github.com/deviceinsight/helm-maven-plugin/actions/workflows/maven.yml/badge.svg)](https://github.com/deviceinsight/helm-maven-plugin/actions/workflows/maven.yml)\n\nA Maven plugin that makes Maven properties available in your Helm Charts. It can be used to automatically package your\nHelm Chart, render it and upload it to a Helm repository like [ChartMuseum](https://chartmuseum.com/).\n\n## Usage\n\nAdd the following to your `pom.xml`\n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n    \u003cplugin\u003e\n      \u003cgroupId\u003ecom.deviceinsight.helm\u003c/groupId\u003e\n      \u003cartifactId\u003ehelm-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e2.11.1\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cchartName\u003emy-chart\u003c/chartName\u003e\n        \u003cchartRepoUrl\u003ehttps://charts.helm.sh/stable\u003c/chartRepoUrl\u003e\n        \u003chelmVersion\u003e3.11.1\u003c/helmVersion\u003e\n        \u003cstrictLint\u003etrue\u003c/strictLint\u003e\n        \u003cvaluesFile\u003esrc/test/helm/my-chart/values.yaml\u003c/valuesFile\u003e\n      \u003c/configuration\u003e\n      \u003cexecutions\u003e\n        \u003cexecution\u003e\n          \u003cgoals\u003e\n            \u003cgoal\u003epackage\u003c/goal\u003e\n            \u003cgoal\u003elint\u003c/goal\u003e\n            \u003cgoal\u003etemplate\u003c/goal\u003e\n            \u003cgoal\u003edeploy\u003c/goal\u003e\n          \u003c/goals\u003e\n        \u003c/execution\u003e\n      \u003c/executions\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\nIn the same Maven module, put your helm charts into `src/main/helm/\u003cchartName\u003e`. In the `Chart.yaml`, you can use the\n`${artifactId}`, `${project.version}`, and `${project.name}` Maven placeholders. You can also use Maven properties.\n\nAn example for a `Chart.yaml` is:\n\n```yaml\napiVersion: v1\ndescription: A Helm chart installing Rubicon\nname: ${artifactId}\nversion: ${project.version}\nhome: https://gitlab.device-insight.com/deviceinsight/rubicon\nmaintainers:\n  - name: Device Insight\n    url: https://www.device-insight.com\n```\n\nYou probably also will adjust the `templates/deployment.yaml` so\nthat the correct docker image is used. An example snippet:\n\n```yaml\n[...]\n      containers:\n        - name: {{ .Chart.Name }}\n          image: \"{{ .Values.image.repository }}/rubicon:${project.version}\"\n[...]\n```\n\n## Configuration\n\n| Property | Default | Description |\n|---|--|---|\n| chartName | The Maven `artifactId` | The name of the chart |\n| chartVersion | `${project.model.version}` | The version of the chart |\n| chartRepoUrl | `null` | The URL of the Chart repository where dependencies are required from and where charts should be published to |\n| incubatorRepoUrl | `https://charts.helm.sh/incubator` | The URL to the incubator Chart repository |\n| addIncubatorRepo | `true` | Whether the repository defined in `incubatorRepoUrl` should be added when running the package goal |\n| forceAddRepos | `false` | Whether to overwrite the repository configuration when adding a new repository with the same name. This flag is only relevant when using Helm 3 and emulates Helm 2 behavior |\n| chartPublishUrl | `${chartRepoUrl}/api/charts` | The URL that will be used for publishing the chart. The default value will work if `chartRepoUrl` refers to a ChartMuseum. |\n| chartPublishMethod | \"POST\" | The HTTP method that will be used for publishing requests |\n| chartDeleteUrl | `${chartRepoUrl}/api/charts/${chartName}/${chartVersion}` | The URL that will be used for deleting a previous version of the chart. This is used for updating SNAPSHOT versions. The default value will work if `chartRepoUrl` refers to a ChartMuseum. |\n| chartRepoUsername | None | The username for basic authentication against the chart repo |\n| chartRepoPassword | None | The password for basic authentication against the chart repo |\n| chartRepoServerId | None | The ID of the server definition from the settings.xml server list to obtain the chart repo username/password from. If both chartRepoUsername/chartRepoPassword and chartRepoServerId are specified then the values specified in chartRepoUsername/chartRepoPassword take precedence. |\n| chartFolder | `\"src/main/helm/\u003cchartName\u003e\"` | The location of the chart files (e.g. Chart.yaml). |\n| skipSnapshots | `true` | If true, SNAPSHOT versions will be built, but not deployed. |\n| helmGroupId | `\"com.deviceinsight.helm\"` | The helm binary `groupId` |\n| helmArtifactId | `\"helm\"` | The helm binary `artifactId` |\n| 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+`, \u003e= 3.4.0 _or_ \u003e= 2.17.0 if you are still using Helm 2) |\n| helmDownloadUrl | `\"https://get.helm.sh/\"` | The URL where the helm binary is downloaded from. |\n| helm.skip | `false` | If true, execution will be skipped entirely |\n| stableRepoUrl | `\"https://charts.helm.sh/stable\"` | For helm 2.x: Can be used to overwrite the default URL for stable repository during `helm init` |\n| strictLint | `false` | If true, linting fails on warnings (see: [Lint](#lint)) |\n| valuesFile | None | values file that should be used for goals [Lint](#lint), [Template](#template) |\n| extraValuesFiles | None | a list of additional values files that can be generated dynamically and will be merged with the values.yaml during [Package](#package). |\n| outputFile | target/test-classes/helm.yaml | output file for [template goal](#template) |\n| deployAtEnd | `false` | If true, the helm chart is deployed at the end of a multi-module Maven build. This option does not make sense for single-module Maven projects. |\n| propertyReplacement | Empty | Structure to configure property replacement performed on the chart files |\n| propertyReplacement.exclusions | Empty | List of file extensions that should be excluded from property replacement. The expressions are by default glob expressions |\n\n## Goals\n\n### Package\n\nGoal packages a chart directory into a chart archive using the [helm package](https://github.com/helm/helm/blob/master/docs/helm/helm_package.md) command.\n\n### Deploy\n\nGoal publishes the packaged chart in the configured chart repository.\n\n### Lint\n\nGoal examines a chart for possible issues using the [helm lint](https://github.com/helm/helm/blob/master/docs/helm/helm_lint.md) command.\n\n* A values file can be provided via parameter `valueFile`\n* Strict linting can be configured via parameter `strictLint`\n\n### Template\n\ngoal locally renders templates using the [helm template](https://github.com/helm/helm/blob/master/docs/helm/helm_template.md) command.\n\n* A values file can be provided via parameter `valueFile`\n* An output file can be provided via parameter `outputFile`\n\n## Example\n\nTo use the `deployAtEnd` functionality it's mandatory to put the Helm Maven Plugin configuration in the parent pom.\n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n    \u003cplugin\u003e\n      \u003cgroupId\u003ecom.deviceinsight.helm\u003c/groupId\u003e\n      \u003cartifactId\u003ehelm-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e2.14.0\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cchartName\u003emy-chart\u003c/chartName\u003e\n        \u003cchartRepoUrl\u003ehttps://charts.helm.sh/stable\u003c/chartRepoUrl\u003e\n        \u003chelmVersion\u003e3.13.0\u003c/helmVersion\u003e\n        \u003cstrictLint\u003etrue\u003c/strictLint\u003e\n        \u003cvaluesFile\u003esrc/test/helm/my-chart/values.yaml\u003c/valuesFile\u003e\n        \u003cdeployAtEnd\u003etrue\u003c/deployAtEnd\u003e\n      \u003c/configuration\u003e\n      \u003cexecutions\u003e\n        \u003cexecution\u003e\n          \u003cgoals\u003e\n            \u003cgoal\u003epackage\u003c/goal\u003e\n            \u003cgoal\u003elint\u003c/goal\u003e\n            \u003cgoal\u003etemplate\u003c/goal\u003e\n            \u003cgoal\u003edeploy\u003c/goal\u003e\n          \u003c/goals\u003e\n        \u003c/execution\u003e\n      \u003c/executions\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n### Exclude files from property replacement\n\nTo exclude files from property replacement, you can use the `propertyReplacement` configuration.\nAny `exclusion` matching will exclude the file from property replacement.\nBy default, glob expressions are used.\nYou can also use regular expressions by prefixing the expression with `regex`. \n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n    \u003cplugin\u003e\n      \u003cgroupId\u003ecom.deviceinsight.helm\u003c/groupId\u003e\n      \u003cartifactId\u003ehelm-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e2.14.0\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cchartName\u003emy-chart\u003c/chartName\u003e\n        \u003cchartRepoUrl\u003ehttps://charts.helm.sh/stable\u003c/chartRepoUrl\u003e\n        \u003chelmVersion\u003e3.13.0\u003c/helmVersion\u003e\n        \u003cstrictLint\u003etrue\u003c/strictLint\u003e\n        \u003cvaluesFile\u003esrc/test/helm/my-chart/values.yaml\u003c/valuesFile\u003e\n        \u003cpropertyReplacement\u003e\n            \u003cexclusions\u003e\n                \u003cexclusion\u003e**/grafana-dashboards/**/*.json\u003c/exclusion\u003e\n                \u003cexclusion\u003eregex:.*/grafana-dashboards/.*\\.json\u003c/exclusion\u003e\n            \u003c/exclusions\u003e\n        \u003c/propertyReplacement\u003e\n      \u003c/configuration\u003e\n      \u003cexecutions\u003e\n        \u003cexecution\u003e\n          \u003cgoals\u003e\n            \u003cgoal\u003epackage\u003c/goal\u003e\n            \u003cgoal\u003elint\u003c/goal\u003e\n            \u003cgoal\u003etemplate\u003c/goal\u003e\n            \u003cgoal\u003edeploy\u003c/goal\u003e\n          \u003c/goals\u003e\n        \u003c/execution\u003e\n      \u003c/executions\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n## Troubleshooting\n\n1. _**Problem**_  \n   The following error message is a common source of trouble, lately:\n   ```\n   [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\n   \n   ...\n   \n   [ERROR] Failed to execute goal com.deviceinsight.helm:helm-maven-plugin:2.11.1: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' -\u003e [Help 1]\n   ```\n   _**Solution**_  \n   This is likely due to an old version of helm itself. Make sure to configure `\u003chelmVersion\u003e` to a version \u003e= 3.4.0 or, if you are still using Helm 2, a version \u003e= 2.17.0 ([background information](https://github.com/helm/charts#%EF%B8%8F-deprecation-and-archive-notice)).\n\n\n2. _**Problem**_  \n   The following error message appears if you use an old version of helm-maven-plugin:\n   ```\n   [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\n   ```\n   _**Solution**_  \n   This can be solved by upgrading helm-maven-plugin itself to version 2.7.0 or later ([#67](https://github.com/deviceinsight/helm-maven-plugin/issues/67)).\n\n## Releasing\n\nCreating a new release involves the following steps:\n\n1. `./mvnw gitflow:release-start gitflow:release-finish`\n2. `git push origin master`\n3. `git push --tags`\n4. `git push origin develop`\n\nIn order to deploy the release to Maven Central, you need to create an account at https://issues.sonatype.org and\nconfigure your account in `~/.m2/settings.xml`:\n\n```xml\n\u003csettings\u003e\n  \u003cservers\u003e\n    \u003cserver\u003e\n      \u003cid\u003eossrh\u003c/id\u003e\n      \u003cusername\u003eyour-jira-id\u003c/username\u003e\n      \u003cpassword\u003eyour-jira-pwd\u003c/password\u003e\n    \u003c/server\u003e\n  \u003c/servers\u003e\n\u003c/settings\u003e\n```\n\nThe account also needs access to the project on Maven Central. This can be requested by another project member.\n\nThen check out the release you want to deploy (`git checkout x.y.z`) and run `./mvnw deploy -Prelease`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviceinsight%2Fhelm-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeviceinsight%2Fhelm-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviceinsight%2Fhelm-maven-plugin/lists"}