当前位置: 首页 > 软件库 > 云计算 > 云原生 >

helm-diff

授权协议 Apache-2.0 License
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 丁高峯
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Helm Diff Plugin

This is a Helm plugin giving your a preview of what a helm upgrade would change.It basically generates a diff between the latest deployed version of a releaseand a helm upgrade --debug --dry-run. This can also be used to compare tworevisions/versions of your helm release.

Install

Using Helm plugin manager (> 2.3.x)

helm plugin install https://github.com/databus23/helm-diff

Pre Helm 2.3.0 Installation

Pick a release tarball from the releases page.

Unpack the tarball in your helm plugins directory ($(helm home)/plugins).

E.g.

curl -L $TARBALL_URL | tar -C $(helm home)/plugins -xzv

From Source

Prerequisites

  • GoLang >= 1.14

Make sure you do not have a verison of helm-diff installed. You can remove it by running helm plugin uninstall diff

Installation Steps

The first step is to download the repository and enter the directory. You can do this via git clone or downloaing and extracting the release. If you clone via git, remember to checkout the latest tag for the latest release.

Next, depending on which helm version you have, install the plugin into helm.

Helm 2
make install
Helm 3
make install/helm3

Usage

The Helm Diff Plugin

* Shows a diff explaining what a helm upgrade would change:
    This fetches the currently deployed version of a release
  and compares it to a local chart plus values. This can be 
  used visualize what changes a helm upgrade will perform.

* Shows a diff explaining what had changed between two revisions:
    This fetches previously deployed versions of a release
  and compares them. This can be used visualize what changes 
  were made during revision change.

* Shows a diff explaining what a helm rollback would change:
    This fetches the currently deployed version of a release
  and compares it to adeployed versions of a release, that you 
  want to rollback. This can be used visualize what changes a 
  helm rollback will perform.

Usage:
  diff [flags]
  diff [command]

Available Commands:
  release     Shows diff between release's manifests
  revision    Shows diff between revision's manifests
  rollback    Show a diff explaining what a helm rollback could perform
  upgrade     Show a diff explaining what a helm upgrade would change.
  version     Show version of the helm diff plugin

Flags:
  -h, --help                   help for diff
      --no-color               remove colors from the output
      --reset-values           reset the values to the ones built into the chart and merge in any new values
      --reuse-values           reuse the last release's values and merge in any new values
      --set stringArray        set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
      --suppress stringArray   allows suppression of the values listed in the diff output
  -q, --suppress-secrets       suppress secrets in the output
  -f, --values valueFiles      specify values in a YAML file (can specify multiple) (default [])
      --version string         specify the exact chart version to use. If this is not specified, the latest version is used

Additional help topics:
  diff          

Use "diff [command] --help" for more information about a command.

Commands:

upgrade:

$ helm diff upgrade -h
Show a diff explaining what a helm upgrade would change.

This fetches the currently deployed version of a release
and compares it to a chart plus values.
This can be used visualize what changes a helm upgrade will
perform.

Usage:
  diff upgrade [flags] [RELEASE] [CHART]

Examples:
  helm diff upgrade my-release stable/postgresql --values values.yaml

Flags:
  -h, --help                   help for upgrade
      --detailed-exitcode      return a non-zero exit code when there are changes
      --post-renderer string   the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path
      --reset-values           reset the values to the ones built into the chart and merge in any new values
      --reuse-values           reuse the last release's values and merge in any new values
      --strip-trailing-cr      strip trailing carriage return on input
      --set stringArray        set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
      --suppress stringArray   allows suppression of the values listed in the diff output
  -q, --suppress-secrets       suppress secrets in the output
  -f, --values valueFiles      specify values in a YAML file (can specify multiple) (default [])
      --version string         specify the exact chart version to use. If this is not specified, the latest version is used

Global Flags:
      --no-color   remove colors from the output

release:

$ helm diff release -h

This command compares the manifests details of a different releases created from the same chart

It can be used to compare the manifests of

 - release1 with release2
	$ helm diff release [flags] release1 release2
   Example:
	$ helm diff release my-prod my-stage

Usage:
  diff release [flags] RELEASE release1 [release2]

Flags:
  -C, --context int            output NUM lines of context around changes (default -1)
  -h, --help                   help for release
      --home string            location of your Helm config. Overrides $HELM_HOME (default "/home/aananth/.helm")
      --include-tests          enable the diffing of the helm test hooks
      --strip-trailing-cr      strip trailing carriage return on input
      --suppress stringArray   allows suppression of the values listed in the diff output
  -q, --suppress-secrets       suppress secrets in the output
      --tls                    enable TLS for request
      --tls-ca-cert string     path to TLS CA certificate file (default "$HELM_HOME/ca.pem")
      --tls-cert string        path to TLS certificate file (default "$HELM_HOME/cert.pem")
      --tls-hostname string    the server name used to verify the hostname on the returned certificates from the server
      --tls-key string         path to TLS key file (default "$HELM_HOME/key.pem")
      --tls-verify             enable TLS for request and verify remote

Global Flags:
      --no-color   remove colors from the output

revision:

$ helm diff revision -h

This command compares the manifests details of a named release.

It can be used to compare the manifests of 
 
 - latest REVISION with specified REVISION
	$ helm diff revision [flags] RELEASE REVISION1
   Example: 
	$ helm diff revision my-release 2

 - REVISION1 with REVISION2
	$ helm diff revision [flags] RELEASE REVISION1 REVISION2
   Example: 
	$ helm diff revision my-release 2 3

Usage:
  diff revision [flags] RELEASE REVISION1 [REVISION2]

Flags:
  -h, --help                   help for revision
      --strip-trailing-cr      strip trailing carriage return on input
      --suppress stringArray   allows suppression of the values listed in the diff output
  -q, --suppress-secrets       suppress secrets in the output

Global Flags:
      --no-color   remove colors from the output

rollback:

$ helm diff rollback -h

This command compares the laset manifests details of a named release 
with specific revision values to rollback.

It forecasts/visualizes changes, that a helm rollback could perform.

Usage:
  diff rollback [flags] [RELEASE] [REVISION]

Examples:
  helm diff rollback my-release 2

Flags:
  -h, --help                   help for rollback
      --strip-trailing-cr      strip trailing carriage return on input
      --suppress stringArray   allows suppression of the values listed in the diff output
  -q, --suppress-secrets       suppress secrets in the output

Global Flags:
      --no-color   remove colors from the output

Build

Clone the repository into your $GOPATH and then build it.

$ mkdir -p $GOPATH/src/github.com/databus23/
$ cd $GOPATH/src/github.com/databus23/
$ git clone https://github.com/databus23/helm-diff.git
$ cd helm-diff
$ make install

The above will install this plugin into your $HELM_HOME/plugins directory.

Prerequisites

  • You need to have Go installed. Make sure to set $GOPATH

Running Tests

Automated tests are implemented with testing.

To run all tests:

go test -v ./...

Release

Set GITHUB_TOKEN and run:

$ make docker-run-release
  • 简化Kubernetes应用部署工具-Helm之Hook 【编者的话】微服务和容器化给复杂应用部署与管理带来了极大的挑战。Helm是目前Kubernetes服务编排领域的唯一开源子项目,做为Kubernetes应用的一个包管理工具,可理解为Kubernetes的apt-get / yum,由Deis 公司发起,该公司已经被微软收购。Helm通过软件打包的形式,支持发布的版本管理和控制,很大程度上简

  • 微服务和容器化给复杂应用部署与管理带来了极大的挑战。Helm是目前Kubernetes服务编排领域的唯一开源子项目,做为Kubernetes应用的一个包管理工具,可理解为Kubernetes的apt-get / yum,由Deis 公司发起,该公司已经被微软收购。Helm通过软件打包的形式,支持发布的版本管理和控制,很大程度上简化了Kubernetes应用部署和管理的复杂性。 随着业务容器化与向微

  • Helm可让开发者不需要搭建全新环境并手动配置每个kube对象,借助Helm和Helm Charts——Kubernetes的模板,就可以自动化90%的工作。 在开发者社区的帮助下,Helm变得越来越强大。开发人员发现Helm Charts非常有用,所以他们开始为特定功能开发工具、附加组件和插件,以进一步增强它。以下是可以使用的一些Helm Charts工具列表。 1. Helmfile 说到He

  • rancher 的MySQL helm安装 MySQL是一种快速,可靠,可扩展且易于使用的开源关系数据库系统。MySQL Server适用于关键任务,高负荷的生产系统以及嵌入到大规模部署的软件中。 TL; DR; $ helm install my-release <helm-repo>/mysql 介绍 该图表使用Helm软件包管理器在Kubernetes集群上引导了MySQL复制集群的部署。

  • Helm安装异常解决方案 参考文章: (1)Helm安装异常解决方案 (2)https://www.cnblogs.com/Mark-Yi/p/11751288.html 备忘一下。

 相关资料
  • 基本概念 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