Helm

Notes relating to Helm!

Helm

Continuous Integration

chart testing (ct)

Example

ct lint --config ./utils/ci/ct.yaml

yamllint

Use yamllint to verify quality YAML is being used!

Example

yamllint --config-file lintconf.yaml values.yaml

Example lintconf.yaml

Flow Control

if/else

create conditional blocks

{{- if eq .Values.favorite.drink "coffee" }}
mug: "true"
{{- end }}

with

Allows the user to specify scope

{{- with .Values.resources }}
	{{- toYaml . | nindent 4 }}
{{- end }}

Sprig functions

Useful for string interpolation

printf "%s has %d dogs." .Name .NumberDogs

Useful for one liner if/else statements

serviceAccountName: {{ ternary (include "notifier.fullname" .) "default" .Values.serviceAccount.create }}

Monitoring

Allows users to export Helm metrics to Prometheus to use within Grafana

The following query will display all the current helm deployments followed by their status ![[2022-02-02-grafana-helm-exporter.png]]

min(helm_chart_info) by (chart, namespace, appVersion, release, version) != 2

The following status codes can help adjust the colors as well:

Status Code
Result

-1

Failed

0

Unknown

1

Deployed

2

Deleted

3

Superseded

5

Deleting

6

Pending Install

7

Pending Upgrade

8

Pending Rollback

Last updated