Skip to content

Instantly share code, notes, and snippets.

@bkonkle
Created October 27, 2016 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkonkle/4dd5e0eb1d9ed32b079ec3a2f14e7d0f to your computer and use it in GitHub Desktop.
Save bkonkle/4dd5e0eb1d9ed32b079ec3a2f14e7d0f to your computer and use it in GitHub Desktop.
Helm template helpers
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- end -}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment