[bitnami/nginx-ingress-controller] Add chart label to template

Signed-off-by: tompizmor <tompizmor@gmail.com>
This commit is contained in:
tompizmor
2018-10-02 11:12:21 +02:00
parent 244f2c17c2
commit 550e08a5d9
4 changed files with 10 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
name: nginx-ingress-controller
version: 2.0.0
version: 2.0.1
appVersion: 0.18.0
description: Chart for the nginx Ingress controller
keywords:

View File

@@ -65,3 +65,10 @@ Return the proper nginx-ingress-controller image name
{{- $tag := .Values.image.tag | toString -}}
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository $tag -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "nginx-ingress-controller.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -28,6 +28,7 @@ spec:
{{- end }}
labels:
app: {{ template "nginx-ingress.name" . }}
chart: {{ template "nginx-ingress-controller.chart" . }}
component: "{{ .Values.name }}"
release: {{ .Release.Name }}
{{- if .Values.podLabels }}

View File

@@ -28,6 +28,7 @@ spec:
{{- end }}
labels:
app: {{ template "nginx-ingress.name" . }}
chart: {{ template "nginx-ingress-controller.chart" . }}
component: "{{ .Values.name }}"
release: {{ .Release.Name }}
{{- if .Values.podLabels }}