From 1c9c9bba658057f6147276fba4f84e7db9117e70 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Fri, 24 Jan 2020 23:29:13 +0100 Subject: [ONAP-wide] Replace .Release.Name with common.release ONAP is too big to be deployed using helm install so we need to use a custom helm plugin helm deploy. This script deloys onap component by component instead of deploying evrything at once. Unfortunately this script also modifies the helm release by appending component name to it. As a result of this behavior our objects are called for example: onap-mariadb-galera-mariadb-galera-0 instead of just being called onap-mariadb-galera-0. This patch simplifies this naming convention by replacing all direct usages of .Release.Name with common.release macro which strips the component specific part from the release name. Issue-ID: OOM-2275 Signed-off-by: Krzysztof Opasiak Change-Id: I450057f5b4a10842f09665ecccc58e4ed727cd89 --- components/aai-babel/templates/configmap.yaml | 2 +- components/aai-babel/templates/deployment.yaml | 4 ++-- components/aai-babel/templates/secrets.yaml | 10 +++++----- components/aai-babel/templates/service.yaml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'components/aai-babel/templates') diff --git a/components/aai-babel/templates/configmap.yaml b/components/aai-babel/templates/configmap.yaml index 031fc06..07e684d 100644 --- a/components/aai-babel/templates/configmap.yaml +++ b/components/aai-babel/templates/configmap.yaml @@ -21,7 +21,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/components/aai-babel/templates/deployment.yaml b/components/aai-babel/templates/deployment.yaml index ea6e64a..71fbd94 100644 --- a/components/aai-babel/templates/deployment.yaml +++ b/components/aai-babel/templates/deployment.yaml @@ -21,7 +21,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} @@ -29,7 +29,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: {{ if .Values.global.installSidecarSecurity }} hostAliases: diff --git a/components/aai-babel/templates/secrets.yaml b/components/aai-babel/templates/secrets.yaml index 7c3b04a..adc2220 100644 --- a/components/aai-babel/templates/secrets.yaml +++ b/components/aai-babel/templates/secrets.yaml @@ -21,7 +21,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} type: Opaque data: @@ -35,7 +35,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} type: Opaque data: @@ -52,7 +52,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} type: Opaque data: @@ -66,7 +66,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} type: Opaque data: @@ -80,7 +80,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} type: Opaque data: diff --git a/components/aai-babel/templates/service.yaml b/components/aai-babel/templates/service.yaml index 9a8b8a2..69892ac 100644 --- a/components/aai-babel/templates/service.yaml +++ b/components/aai-babel/templates/service.yaml @@ -21,7 +21,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: type: {{ .Values.service.type }} @@ -49,4 +49,4 @@ spec: {{ end }} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} -- cgit 1.2.3-korg