This is a Maven plugin for testing, packaging and uploading HELM charts.
"HELM is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources."
Visit https://docs.helm.sh for detailed information.
Currently the upload to ChartMuseum and Artifactory is supported.
From version 5.0 Helm v3 is required.There is no longer support for Helm v2.For convenience reasons the stable repo is added by default.
Helm v2 users can still use plugin version 4.13.
Currently (October 2017) there is no simple Maven plugin to package existing HELM charts.
By default, the plugin automatically downloads Helm at the specified version. You can also manually specify the download URL.Next to that it is possible to specify a local Helm binary. In all cases Helm will be executed in the background.
Add following dependency to your pom.xml:
<dependency>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
</dependency>
The default setting is to construct the Helm download URL based upon the detected OS and architecture:
<build>
<plugins>
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<helmVersion>3.2.0</helmVersion>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
...
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<!-- This is the related section when using binary download -->
<helmDownloadUrl>https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz</helmDownloadUrl>
</configuration>
</plugin>
...
</plugins>
</build>
When useLocalHelmBinary
is enabled, the plugin by default will search for the helm
executable in PATH
:
<build>
<plugins>
...
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<!-- This is the related section to use local binary with auto-detection enabled. -->
<useLocalHelmBinary>true</useLocalHelmBinary>
</configuration>
</plugin>
...
</plugins>
</build>
The following is an example configuration that explicitly sets the directory in which to look for the helm
executable,and disables the auto-detection feature:
<build>
<plugins>
...
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<!-- This is the related section to use local binary with auto-detection disabled. -->
<useLocalHelmBinary>true</useLocalHelmBinary>
<autoDetectLocalHelmBinary>false</autoDetectLocalHelmBinary>
<helmExecutableDirectory>/usr/local/bin</helmExecutableDirectory>
</configuration>
</plugin>
...
</plugins>
</build>
<build>
<plugins>
...
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<!-- This is the related section to configure upload repos -->
<uploadRepoStable>
<name>stable-repo</name>
<url>https://repo.example.com/artifactory/helm-stable</url>
<type>ARTIFACTORY</type>
</uploadRepoStable>
<uploadRepoSnapshot>
<name>snapshot-repo</name>
<url>https://my.chart.museum:8080/api/charts</url>
<type>CHARTMUSEUM</type>
</uploadRepoSnapshot>
<helmDownloadUrl>https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz</helmDownloadUrl>
</configuration>
</plugin>
...
</plugins>
</build>
<build>
<plugins>
...
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<version>5.6</version>
<configuration>
<chartDirectory>${project.basedir}</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<uploadRepoStable>
<name>stable-repo</name>
<url>https://repo.example.com/artifactory/helm-stable</url>
<!-- Artifacotry requires basic authentication -->
<!-- which is supported from HELM version >= 2.9 -->
<type>ARTIFACTORY</type>
<username>foo</username>
<password>bar</password>
</uploadRepoStable>
<uploadRepoSnapshot>
<name>snapshot-repo</name>
<url>https://my.chart.museum/api/charts</url>
<type>CHARTMUSEUM</type>
</uploadRepoSnapshot>
<helmDownloadUrl>https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz</helmDownloadUrl>
<helmHomeDirectory>${project.basedir}/target/helm/home</helmHomeDirectory>
<registryConfig>~/.config/helm/registry.json</registryConfig>
<repositoryCache>~/.cache/helm/repository</repositoryCache>
<repositoryConfig>~/.config/helm/repositories.yaml</repositoryConfig>
<!-- Lint with strict mode -->
<lintStrict>true</lintStrict>
<!-- Disable adding of default repo stable https://charts.helm.sh/stable -->
<addDefaultRepo>false</addDefaultRepo>
<!-- Exclude a directory to avoid processing -->
<excludes>
<exclude>${project.basedir}/excluded</exclude>
<exclude>${project.basedir}/**/excluded*</exclude>
</excludes>
<!-- Add an additional repo -->
<helmExtraRepos>
<helmRepo>
<name>kiwigrid</name>
<url>https://kiwigrid.github.io</url>
</helmRepo>
</helmExtraRepos>
<!-- extra value settings for the lint command -->
<values>
<overrides>
<component1.install.path>/opt/component1</component1.install.path>
</overrides>
<yamlFile>${project.basedir}/src/test/resources/myOverrides.yaml</yamlFile>
</values>
</configuration>
</plugin>
...
</plugins>
</build>
helm:init
initializes Helm by downloading a specific versionhelm:dependency-build
resolves the chart dependencieshelm:package
packages the given charts (chart.tar.gz)helm:lint
tests the given chartshelm:dry-run
simulates an installhelm:upload
upload charts via HTTP PUTParameter | Type | User Property | Required | Description |
---|---|---|---|---|
<chartDirectory> |
string | helm.chartDirectory | true | root directory of your charts |
<chartVersion> |
string | helm.chartVersion | true | Version of the charts. The version have to be in the SEMVER-Format, required by helm. |
<appVersion> |
string | helm.appVersion | false | The version of the app. This needn't be SemVer. |
<helmDownloadUrl> |
string | helm.downloadUrl | false | URL to download helm. Leave empty to autodetect URL based upon OS and architecture. |
<helmVersion> |
string | helm.version | false | Version of helm to download. Defaults to 3.2.0 |
<excludes> |
list of strings | helm.excludes | false | list of chart directories to exclude |
<useLocalHelmBinary> |
boolean | helm.useLocalHelmBinary | false | Controls whether a local binary should be used instead of downloading it. If set to true path has to be set with property executableDirectory |
<autoDetectLocalHelmBinary> |
boolean | helm.autoDetectLocalHelmBinary | true | Controls whether the local binary should be auto-detected from PATH environment variable. If set to false the binary in <helmExecutableDirectory> is used. This property has no effect unless <useLocalHelmBinary> is set to true . |
<helmExecutableDirectory> |
string | helm.executableDirectory | false | directory of your helm installation (default: ${project.build.directory}/helm ) |
<outputDirectory> |
string | helm.outputDirectory | false | chart output directory (default: ${project.build.directory}/helm/repo ) |
<registryConfig> |
string | helm.registryConfig | false | path to the registry config file |
<repositoryCache> |
string | helm.repositoryCache | false | path to the file containing cached repository indexes |
<repositoryConfig> |
string | helm.repositoryConfig | false | path to the file containing repository names and URLs |
<helmExtraRepos> |
list of HelmRepository | helm.extraRepos | false | adds extra repositories while init |
<uploadRepoStable> |
HelmRepository | helm.uploadRepo.stable | true | Upload repository for stable charts |
<uploadRepoSnapshot> |
HelmRepository | helm.uploadRepo.snapshot | false | Upload repository for snapshot charts (determined by version postfix 'SNAPSHOT') |
<lintStrict> |
boolean | helm.lint.strict | false | run lint command with strict option (fail on lint warnings) |
<addDefaultRepo> |
boolean | helm.init.add-default-repo | true | If true, stable repo (https://charts.helm.sh/stable) will be added |
<skip> |
boolean | helm.skip | false | skip plugin execution |
<skipInit> |
boolean | helm.init.skip | false | skip init goal |
<skipLint> |
boolean | helm.lint.skip | false | skip lint goal |
<skipDryRun> |
boolean | helm.dry-run.skip | false | skip dry-run goal |
<skipDependencyBuild> |
boolean | helm.dependency-build.skip | false | skip dependency-build goal |
<skipPackage> |
boolean | helm.package.skip | false | skip package goal |
<skipUpload> |
boolean | helm.upload.skip | false | skip upload goal |
<security> |
string | helm.security | false | path to your settings-security.xml (default: ~/.m2/settings-security.xml ) |
<values> |
ValueOverride | helm.values | false | override some values for linting with helm.values.overrides (--set option), helm.values.stringOverrides (--set-string option), helm.values.fileOverrides (--set-file option) and last but not least helm.values.yamlFile (--values option) |
To keep your pom files small you can use 'helm' packaging. This binds helm:init
to the initialize phase, helm:lint
to the test phase, helm:package
to the package phase and helm:upload
to the deploy phase.
<pom>
<artifactId>my-helm-charts</artifactId>
<version>0.0.1</version>
<packaging>helm</packaging>
...
<build>
<plugins>
<plugin>
<groupId>com.kiwigrid</groupId>
<artifactId>helm-maven-plugin</artifactId>
<!-- Mandatory when you use a custom lifecycle -->
<extensions>true</extensions>
<configuration>
...
</configuration>
</plugin>
</plugins>
....
</build>
</pom>
Maven deploy plugin使用 简介 maven deploy plugin主要是为了用来将artifact部署到远程仓库中。 Goals Goal Description deploy:deploy 部署artifact到远程仓库 deploy:deploy-file 安装artifact到远程仓库 deploy:help 显示帮助信息 Usage: deploy:deploy 主要
发布一个k8s部署视频:https://edu.csdn.net/course/detail/26967 课程内容:各种k8s部署方式。包括minikube部署,kubeadm部署,kubeasz部署,rancher部署,k3s部署。包括开发测试环境部署k8s,和生产环境部署k8s。 腾讯课堂连接地址https://ke.qq.com/course/478827?taid=437310993146
基于 K8S 构建 Jenkins 微服务发布平台 实现汇总: 发布流程设计讲解 准备基础环境 K8s环境(部署Ingress Controller,CoreDNS,Calico/Flannel) 部署代码版本仓库Gitlab 配置本地Git上传测试代码,创建项目到Gitlab 部署pinpoint 全链路监控系统(提前修改Dockerfile,打包镜像上传) 部署镜像仓库Harbor(开启hel
转载于 http://blog.c7d8.com/blog/18.html ,原文可能有更新,以原文为准 背景 现有的应用编译、maven打包、docker镜像构建都是在一个job或者同一个gitlab-runner中完成的,且使用了 maven 的 插件 “docker-maven-plugin” ,虽然一个命令 mvn package 就可以在CI环境构建为镜像,但毕竟maven本身的打包过程
前言:最近在学习Maven管理,在网上看到一篇Maven核心之pom详解,转载给大家。 POM全称是Project Object Model,即项目对象模型。pom.xml是maven的项目描述文件,它类似与antx的project.xml文件。pom.xml文件以xml的 形式描述项目的信息,包括项目名称、版本、项目id、项目的依赖关系、编译环境、持续集成、项目团队、贡献管理、生成报表
helm部署jenkins及使用pipeline流水线 1.安装helm 略,请参考本专栏helm文档 2.创建存储类storageClass 请参考《helm搭建NFS的StorageClass》,本专栏可以查看到 3.helm添加jenkins官方仓库 # helm repo add jenkinsci https://charts.jenkins.io # helm repo update
基本概念 Helm 的三个基本概念 Chart:Helm 应用(package),包括该应用的所有 Kubernetes manifest 模版,类似于 YUM RPM 或 Apt dpkg 文件 Repository:Helm package 存储仓库 Release:chart 的部署实例,每个 chart 可以部署一个或多个 release Helm 工作原理 Helm 包括两个部分,hel
查询 charts helm search helm search mysql 查询 package 详细信息 helm inspect stable/mariadb 部署 package helm install stable/mysql 部署之前可以自定义 package 的选项: # 查询支持的选项 helm inspect values stable/mysql # 自定义 passwor
Helm 帮助您管理 Kubernetes 应用程序——Helm Charts 帮助您定义、安装和升级最复杂的 Kubernetes 应用程序。 Helm 可以使用 Charts 启动 Kubernetes 集群,提供可用的工作流: 一个 Redis 集群 一个 Postgres 数据库 一个 HAProxy 边界负载均衡 特性: 查找并使用流行的软件,将其打包为 Helm Charts,以便在
Helm 是一个在桌面上使用的系统监控小工具,可定制监控的内容并在桌面上显示,如下图所示:
python-helm 是 kubernetes 组件 helm 的 python 客户端,它是基于 pyhelm 进行功能扩展, 对tiller 的操作更为全面。 功能 python-helm 可以实现对Tiller的访问 Tiller控制 安装 升级 回滚 删除 测试 获取版本历史
Prometheus Community Kubernetes Helm Charts This functionality is in beta and is subject to change. The code is provided as-is with no warranties. Beta features are not subject to the support SLA of o