From 7f8827710ca58fe585ecaccaae763b1ac8b09de4 Mon Sep 17 00:00:00 2001 From: Levent Yalcin Date: Thu, 14 Nov 2024 13:41:38 +0000 Subject: [PATCH] Additinoal labels for all resources (v1.6.x) --- 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 b3f8d065..b8c1ae0b 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.