Merge "[COMMON] Add version label to be Istio ready"
[oom.git] / kubernetes / common / common / templates / _labels.tpl
index 993fb7d..a690acd 100644 (file)
@@ -26,6 +26,12 @@ The function takes several arguments (inside a dictionary):
 {{- define "common.labels" -}}
 {{- $dot := default . .dot -}}
 app.kubernetes.io/name: {{ include "common.name" $dot }}
+app: {{ include "common.name" $dot }}
+{{- if $dot.Chart.AppVersion }}
+version: "{{ $dot.Chart.AppVersion | replace "+" "_" }}"
+{{- else }}
+version: "{{ $dot.Chart.Version | replace "+" "_" }}"
+{{- end }}
 {{ if not .ignoreHelmChart }}
 helm.sh/chart: {{ include "common.chart" $dot }}
 {{- end }}