From 7988096de261bd42d41b8b28945fac5e25c9e586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Kalbermatter?= Date: Mon, 10 Jun 2024 11:37:37 +0200 Subject: [PATCH] feat: add helpers.tpl --- templates/_helpers.tpl | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 templates/_helpers.tpl diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl new file mode 100644 index 0000000..a2ff1fd --- /dev/null +++ b/templates/_helpers.tpl @@ -0,0 +1,38 @@ +{{/* +Generate the fullname for resources. +*/}} +{{- define "stalwart-mail.fullname" -}} +{{- printf "%s-%s" .Release.Name "stalwart-mail" -}} +{{- end -}} + +{{/* +Generate labels for resources. +*/}} +{{- define "stalwart-mail.labels" -}} +app.kubernetes.io/name: {{ include "stalwart-mail.name" . }} +helm.sh/chart: {{ include "stalwart-mail.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Generate selector labels for resources. +*/}} +{{- define "stalwart-mail.selectorLabels" -}} +app.kubernetes.io/name: {{ include "stalwart-mail.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Generate the name for the application. +*/}} +{{- define "stalwart-mail.name" -}} +stalwart-mail +{{- end -}} + +{{/* +Generate the chart name and version. +*/}} +{{- define "stalwart-mail.chart" -}} +{{ printf "%s-%s" .Chart.Name .Chart.Version }} +{{- end -}}