Add the "version" label (Chart.Version or Chart.AppVesrion
if exists)
Correct the metadata of CPS deployment.
Issue-ID: OOM-3230
Change-Id: I0a6907ed95c6b0dfcf7f89fec9c3dafbc2fb1d9b
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
{{- $dot := default . .dot -}}
app.kubernetes.io/name: {{ include "common.name" $dot }}
app: {{ include "common.name" $dot }}
{{- $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 }}
{{ if not .ignoreHelmChart }}
helm.sh/chart: {{ include "common.chart" $dot }}
{{- end }}
maxSurge: {{ index .Values.updateStrategy.maxSurge }}
selector: {{- include "common.selectors" . | nindent 4 }}
template:
maxSurge: {{ index .Values.updateStrategy.maxSurge }}
selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app.kubernetes.io/name: {{ include "common.name" . }}
- app.kubernetes.io/instance: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
{{ include "common.podSecurityContext" . | indent 6 | trim}}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
spec:
{{ include "common.podSecurityContext" . | indent 6 | trim}}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}