From a5afffec8b2cf2674e88cae52c54c8d19b272d43 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sat, 3 Feb 2024 15:37:48 +0100 Subject: [PATCH] fix(netbox): refactor labels in _helpers.tpl --- charts/netbox/Chart.yaml | 2 +- charts/netbox/templates/_helpers.tpl | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 2fe6cb0..098372d 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.7 +version: 6.0.8 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/netbox/templates/_helpers.tpl b/charts/netbox/templates/_helpers.tpl index b02d0f0..b5086ec 100644 --- a/charts/netbox/templates/_helpers.tpl +++ b/charts/netbox/templates/_helpers.tpl @@ -38,22 +38,14 @@ Get the correct image tag name {{- .Values.image.tag | default (printf "v%s" .Chart.AppVersion) -}} {{- end -}} -{{/* -Selector labels -*/}} -{{- define "netbox.selectorLabels" -}} -app.kubernetes.io/name: {{ include "netbox.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - +# Define a template for standard labels. {{/* 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/name: {{ include "netbox.fullname" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: {{ .Chart.Version | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} +{{- end }}