From 8c55fdd1dc3f78e32d7214353f09dd67831de216 Mon Sep 17 00:00:00 2001 From: Andreas Geissler Date: Thu, 20 Jul 2023 11:15:42 +0200 Subject: [COMMON] Add missing labels for etcd, mongo, postgres Add labels for DB deployments to be compliant with Istio and kiali requirements Issue-ID: OOM-3230 Change-Id: I937d9f326dae8e2c2496eace2e919aa0b8eb0171 Signed-off-by: Andreas Geissler --- kubernetes/common/postgres/templates/_deployment.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'kubernetes/common/postgres/templates') diff --git a/kubernetes/common/postgres/templates/_deployment.tpl b/kubernetes/common/postgres/templates/_deployment.tpl index a4eb1107a5..fa25a42158 100644 --- a/kubernetes/common/postgres/templates/_deployment.tpl +++ b/kubernetes/common/postgres/templates/_deployment.tpl @@ -27,6 +27,12 @@ metadata: namespace: {{ include "common.namespace" $dot }} labels: app: {{ include "common.name" $dot }}-{{ $pgMode }} + app.kubernetes.io/name: {{ include "common.name" $dot }}-{{ $pgMode }} + {{- if $dot.Chart.AppVersion }} + version: "{{ $dot.Chart.AppVersion | replace "+" "_" }}" + {{- else }} + version: "{{ $dot.Chart.Version | replace "+" "_" }}" + {{- end }} chart: {{ $dot.Chart.Name }}-{{ $dot.Chart.Version | replace "+" "_" }} release: {{ include "common.release" $dot }} heritage: {{ $dot.Release.Service }} @@ -42,6 +48,12 @@ spec: metadata: labels: app: {{ include "common.name" $dot }}-{{ $pgMode }} + app.kubernetes.io/name: {{ include "common.name" $dot }}-{{ $pgMode }} + {{- if $dot.Chart.AppVersion }} + version: "{{ $dot.Chart.AppVersion | replace "+" "_" }}" + {{- else }} + version: "{{ $dot.Chart.Version | replace "+" "_" }}" + {{- end }} release: {{ include "common.release" $dot }} name: "{{ index $dot.Values "container" "name" $pgMode }}" spec: -- cgit 1.2.3-korg