github.com/zsuzhengdu/helm@v3.0.0-beta.3+incompatible/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl (about) 1 {{- /* 2 common.labelize takes a dict or map and generates labels. 3 4 Values will be quoted. Keys will not. 5 6 Example output: 7 8 first: "Matt" 9 last: "Butcher" 10 11 */ -}} 12 {{- define "common.labelize" -}} 13 {{- range $k, $v := . }} 14 {{ $k }}: {{ $v | quote }} 15 {{- end -}} 16 {{- end -}} 17 18 {{- /* 19 common.labels.standard prints the standard Helm labels. 20 21 The standard labels are frequently used in metadata. 22 */ -}} 23 {{- define "common.labels.standard" -}} 24 app.kubernetes.io/name: {{ template "common.name" . }} 25 helm.sh/chart: {{ template "common.chartref" . }} 26 app.kubernetes.io/managed-by: {{ .Release.Service | quote }} 27 app.kubernetes.io/instance: {{ .Release.Name | quote }} 28 {{- end -}}