Skip to content

Instantly share code, notes, and snippets.

@madsonic
Created April 17, 2019 07:49
Show Gist options
  • Save madsonic/d80cc77dee780d7991aa3b48dabf04ef to your computer and use it in GitHub Desktop.
Save madsonic/d80cc77dee780d7991aa3b48dabf04ef to your computer and use it in GitHub Desktop.
helm stuff
{{- /*
The standard labels are frequently used in metadata.
*/ -}}
{{- define "yourchart.labels.standard" -}}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
helm.sh/chart: {{ include "yourchart.chart" . }}
helm.sh/appVersion: {{ .Chart.AppVersion | quote }}
helm.sh/chartVersion: {{ .Chart.Version | quote }}
helm.sh/revision: {{ .Chart.Revision | quote }}
{{- end -}}
# to include it in your template, adjusting for whitespace accordingly
{{- include "yourchart.labels.standard" . | nindent 4 }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment