From bd0c36d6013f580379471dd021efac5254f10ac0 Mon Sep 17 00:00:00 2001 From: Levent Yalcin Date: Thu, 14 Nov 2024 13:39:20 +0000 Subject: [PATCH] Additinoal labels for all resources (v1.7.x Signed-off-by: Levent Yalcin --- charts/longhorn/templates/_helpers.tpl | 3 +++ charts/longhorn/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/longhorn/templates/_helpers.tpl b/charts/longhorn/templates/_helpers.tpl index 3fbc2ac0..407a3dc8 100644 --- a/charts/longhorn/templates/_helpers.tpl +++ b/charts/longhorn/templates/_helpers.tpl @@ -35,6 +35,9 @@ helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion }} +{{- with .Values.global.additionalLabels }} +{{- toYaml . | nindent 0 }} +{{- end }} {{- end -}} diff --git a/charts/longhorn/values.yaml b/charts/longhorn/values.yaml index 6358f54c..a0297001 100644 --- a/charts/longhorn/values.yaml +++ b/charts/longhorn/values.yaml @@ -2,6 +2,8 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. global: + # -- Addtional labels for all the resources + additionalLabels: {} # -- Toleration for nodes allowed to run user-deployed components such as Longhorn Manager, Longhorn UI, and Longhorn Driver Deployer. tolerations: [] # -- Node selector for nodes allowed to run user-deployed components such as Longhorn Manager, Longhorn UI, and Longhorn Driver Deployer.