From e94afff689499e0ecae3dea74161fa4bcc811a54 Mon Sep 17 00:00:00 2001 From: Tommy Date: Wed, 31 Jan 2024 16:34:08 +0100 Subject: [PATCH] fix(netbox) add support for labels --- charts/netbox/Chart.yaml | 2 +- charts/netbox/templates/_helpers.tpl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 734356d..06a0ab2 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -4,7 +4,7 @@ description: | An IP address management (IPAM) and data center infrastructure management (DCIM) tool. appVersion: v3.7.1 type: application -version: 6.0.1 +version: 6.0.2 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/netbox/templates/_helpers.tpl b/charts/netbox/templates/_helpers.tpl index a0ac634..39d35e4 100644 --- a/charts/netbox/templates/_helpers.tpl +++ b/charts/netbox/templates/_helpers.tpl @@ -37,3 +37,15 @@ Get the correct image tag name {{- define "netbox.imageTag" -}} {{- .Values.image.tag | default (printf "v%s" .Chart.AppVersion) -}} {{- end -}} + +{{/* +Common labels +*/}} +{{- define "netbox.labels" -}} +helm.sh/chart: {{ include "netbox.chart" . }} +{{ include "netbox.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} \ No newline at end of file