mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 19:49:33 -03:00
add labels
This commit is contained in:
21
library/common/1.0.0/templates/lib/chart/_labels.tpl
Normal file
21
library/common/1.0.0/templates/lib/chart/_labels.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
{{/* Common labels shared across objects */}}
|
||||
{{- define "ix.v1.common.labels" -}}
|
||||
helm.sh/chart: {{ include "ix.v1.common.names.chart" . }}
|
||||
{{ include "ix.v1.common.labels.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
helm-revision: {{ .Release.Revision | quote }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- with .Values.global.labels }}
|
||||
{{- range $k, $v := . }}
|
||||
{{ $k }}: {{ tpl $v $ | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Selector labels shared across objects */}}
|
||||
{{- define "ix.v1.common.labels.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "ix.v1.common.names.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user