Skip to content

Instantly share code, notes, and snippets.

@scottrigby
Last active August 25, 2020 23:13
Show Gist options
  • Save scottrigby/8117c4a4a10a33e597ca98f6aca95e8a to your computer and use it in GitHub Desktop.
Save scottrigby/8117c4a4a10a33e597ca98f6aca95e8a to your computer and use it in GitHub Desktop.
Chart README template

{{.Chart.Name}}

{{.App.Description}}

{{if .Prerequisites}}

Prerequisites

{{range .Prerequisites}}{{printf "- %s\n" .}}{{end}} {{end}}

Get Repo Info

helm repo add {{Repo.Name}} {{Repo.URL}}
{{range $d := .Chart.Dependencies}}
<-- To-do: get preferred repo shortname from Artifact Hub API (example: bitnami).-->
helm repo add {{$d.ShortName}} {{$d.Repository}}
{{end}}
helm repo update

See helm repo for command documentation.

Install Chart

# Helm 3
$ helm install [RELEASE_NAME] {{Repo.Name}}/{{.Chart.Name}} [flags]

# Helm 2
$ helm install --name [RELEASE_NAME] {{Repo.Name}}/{{.Chart.Name}} [flags]

See configuration below.

See helm install for command documentation.

{{if .Chart.Dependencies}}

Dependencies

By default this chart installs additional, dependent charts:

{{range $d := .Chart.Dependencies}}

{{range $d := .Chart.Dependencies}} {{define "depEnabledKeys"}} {{default $d.Name $d.alias}}.enabled {{end}} {{end}} To disable the dependency during installation, set {{StringsJoin .depEnabledKeys ", "}} to false.

See helm dependency for command documentation. {{end}}

Uninstall Chart

# Helm 3
$ helm uninstall [RELEASE_NAME]

# Helm 2
# helm delete --purge [RELEASE_NAME]

This removes all the Kubernetes components associated with the chart and deletes the release.

See helm uninstall for command documentation.

Upgrading Chart

# Helm 3 or 2
$ helm upgrade [RELEASE_NAME] {{Repo.Name}}/{{.Chart.Name}} [flags]

See helm upgrade for command documentation.

Major Version Upgrades

Chart release versions follow semver, where a MAJOR version change (example 1.0.0 -> 2.0.0) indicates an incompatible breaking change needing manual actions.

To v2.0.0

Example manual steps.

To v1.0.0

Example manual steps.

Configuration

See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:

# Helm 2
$ helm inspect values prometheus-community/prometheus

# Helm 3
$ helm show values prometheus-community/prometheus

You may similarly use the above configuration commands on each chart dependency to see it's configurations.

Configuration Type A

Example config steps:

  1. Create secret with shell command
  2. Install chart with setting foo.bar to [SECRET_NAME], and baz.qux.quux to true

Configuration Type B

In order to X, you must set quuz.corge to false and quuz.grault to garply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment