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-schema-service/templates/configmap.yaml | 10 +++++----- components/aai-schema-service/templates/deployment.yaml | 4 ++-- components/aai-schema-service/templates/service.yaml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'components/aai-schema-service/templates') diff --git a/components/aai-schema-service/templates/configmap.yaml b/components/aai-schema-service/templates/configmap.yaml index 91a831a..9b7ea73 100644 --- a/components/aai-schema-service/templates/configmap.yaml +++ b/components/aai-schema-service/templates/configmap.yaml @@ -20,7 +20,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 "config/logback.xml").AsConfig . | indent 2 }} @@ -33,7 +33,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 "config/localhost-access-logback.xml").AsConfig . | indent 2 }} @@ -46,7 +46,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 "config/aaiconfig.properties").AsConfig . | indent 2 }} @@ -59,7 +59,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 "config/application.properties").AsConfig . | indent 2 }} @@ -72,7 +72,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 "config/realm.properties").AsConfig . | indent 2 }} diff --git a/components/aai-schema-service/templates/deployment.yaml b/components/aai-schema-service/templates/deployment.yaml index 38a19d3..95849f8 100644 --- a/components/aai-schema-service/templates/deployment.yaml +++ b/components/aai-schema-service/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 }} @@ -32,7 +32,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} name: {{ include "common.name" . }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} diff --git a/components/aai-schema-service/templates/service.yaml b/components/aai-schema-service/templates/service.yaml index d119912..68d767b 100644 --- a/components/aai-schema-service/templates/service.yaml +++ b/components/aai-schema-service/templates/service.yaml @@ -20,7 +20,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 }} @@ -40,5 +40,5 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} clusterIP: None -- cgit 1.2.3-korg