From f77bb704ffd481b0e0caea7a28c7d32fd6921d54 Mon Sep 17 00:00:00 2001 From: Andri Joos <andri@joos.io> Date: Thu, 23 Jan 2025 22:30:25 +0100 Subject: [PATCH] add possibility for custom labels --- common/templates/_helpers.tpl | 3 +++ example/values.yaml | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/templates/_helpers.tpl b/common/templates/_helpers.tpl index 4bbcda7..a191068 100644 --- a/common/templates/_helpers.tpl +++ b/common/templates/_helpers.tpl @@ -14,6 +14,9 @@ helm.sh/chart: {{ include "common.variables.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- range $key, $value := .Values.labels }} +{{ $key }}: {{ $value | quote }} +{{- end }} {{- end }} {{/* diff --git a/example/values.yaml b/example/values.yaml index 0758776..a1c0f69 100644 --- a/example/values.yaml +++ b/example/values.yaml @@ -35,6 +35,9 @@ volumes: persistentVolumes: example: name: example + labels: + test: test + test2: test2 size: 5Gi mountOptions: - nfsvers=4.1 @@ -65,6 +68,6 @@ acme: email: your-email@example.com secretName: example-tls solvers: - http01: - ingress: - class: traefik + - http01: + ingress: + class: traefik -- GitLab