From 68f6e3b4018dfaaff237773d8939b83a1e7ea889 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Tue, 8 Nov 2022 23:37:07 +0200 Subject: [PATCH] add labels --- .../1.0.0/templates/lib/chart/_labels.tpl | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 library/common/1.0.0/templates/lib/chart/_labels.tpl diff --git a/library/common/1.0.0/templates/lib/chart/_labels.tpl b/library/common/1.0.0/templates/lib/chart/_labels.tpl new file mode 100644 index 00000000..f3f1b5da --- /dev/null +++ b/library/common/1.0.0/templates/lib/chart/_labels.tpl @@ -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 -}}