From c65d67b1541c32fb36ad4ee61fe9e8b5745387dd Mon Sep 17 00:00:00 2001 From: Matan Heled Date: Mon, 12 Feb 2024 08:51:05 +0200 Subject: [PATCH] Added support for custom extra labels --- charts/port-k8s-exporter/templates/_helpers.tpl | 3 +++ charts/port-k8s-exporter/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/charts/port-k8s-exporter/templates/_helpers.tpl b/charts/port-k8s-exporter/templates/_helpers.tpl index 0f3f5ca..ca172c1 100644 --- a/charts/port-k8s-exporter/templates/_helpers.tpl +++ b/charts/port-k8s-exporter/templates/_helpers.tpl @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "port-k8s-exporter.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- range $key, $value := .Values.extraLabels }} +{{$key}}: {{ $value }} +{{- end }} {{- end }} {{/* diff --git a/charts/port-k8s-exporter/values.yaml b/charts/port-k8s-exporter/values.yaml index 65f1f49..ec9b79d 100644 --- a/charts/port-k8s-exporter/values.yaml +++ b/charts/port-k8s-exporter/values.yaml @@ -9,6 +9,9 @@ verbosity: 0 createDefaultResources: true overwriteConfigurationOnRestart: false +extraLabels: {} +# port: true + image: repository: ghcr.io/port-labs/port-k8s-exporter pullPolicy: IfNotPresent