From 137d7ccd2597a6492e926818eebab2f6067fb382 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Fri, 24 Jan 2020 23:49:11 +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: Ia8cead50d305adb00eef666d0a1ace74479b5183 --- kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml | 6 +++--- kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml | 4 ++-- kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml | 6 +++--- kubernetes/aaf/charts/aaf-hello/templates/service.yaml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'kubernetes/aaf/charts/aaf-hello') diff --git a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml index af82689ef2..7fa74075fc 100644 --- a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml +++ b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml @@ -24,12 +24,12 @@ kind: PersistentVolume apiVersion: v1 metadata: - name: {{ .Release.Name }}-aaf-hello-pv + name: {{ include "common.release" . }}-aaf-hello-pv namespace: {{ include "common.namespace" . }} labels: app: {{ .Chart.Name }}-hello chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - release: "{{ .Release.Name }}" + release: {{ include "common.release" . }} heritage: "{{ .Release.Service }}" name: {{ include "common.fullname" . }} spec: @@ -39,7 +39,7 @@ spec: - {{ .Values.persistence.config.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath }} storageClassName: "{{ include "common.fullname" . }}-data" {{- end -}} {{- end -}} diff --git a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml index 68828767e3..fc148f63d6 100644 --- a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml +++ b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml @@ -22,12 +22,12 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ .Release.Name }}-aaf-hello-pvc + name: {{ include "common.release" . }}-aaf-hello-pvc namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" + release: "{{ include "common.release" . }}" heritage: "{{ .Release.Service }}" {{- if .Values.persistence.annotations }} annotations: diff --git a/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml index 2135f1ef31..92afc5a369 100644 --- a/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml +++ b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml @@ -17,7 +17,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} @@ -27,7 +27,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: volumes: - name: localtime @@ -36,7 +36,7 @@ spec: - name: aaf-hello-vol {{- if and .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ .Release.Name }}-aaf-hello-pvc + claimName: {{ include "common.release" . }}-aaf-hello-pvc {{- else }} emptyDir: {} {{- end }} diff --git a/kubernetes/aaf/charts/aaf-hello/templates/service.yaml b/kubernetes/aaf/charts/aaf-hello/templates/service.yaml index ab89171c50..5ba4f68be9 100644 --- a/kubernetes/aaf/charts/aaf-hello/templates/service.yaml +++ b/kubernetes/aaf/charts/aaf-hello/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: ports: @@ -29,5 +29,5 @@ spec: name: aaf-hello selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} type: "NodePort" -- cgit 1.2.3-korg