fix(netbox): refactor labels in _helpers.tpl

This commit is contained in:
Tommy 2024-02-03 15:37:48 +01:00
parent 1477eb716f
commit a5afffec8b
No known key found for this signature in database
2 changed files with 6 additions and 14 deletions

View file

@ -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

View file

@ -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 }}