diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-01-24 23:49:11 +0100 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-02-01 00:10:01 +0100 |
commit | 137d7ccd2597a6492e926818eebab2f6067fb382 (patch) | |
tree | 75aab2669ecb57a7008c7156fded0678e6ea9fba /kubernetes/common/music/charts/zookeeper/templates | |
parent | 03b1009c7b791ea3252237f79367ff0501460f16 (diff) |
[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 <k.opasiak@samsung.com>
Change-Id: Ia8cead50d305adb00eef666d0a1ace74479b5183
Diffstat (limited to 'kubernetes/common/music/charts/zookeeper/templates')
7 files changed, 17 insertions, 17 deletions
diff --git a/kubernetes/common/music/charts/zookeeper/templates/config-jmx-exporter.yaml b/kubernetes/common/music/charts/zookeeper/templates/config-jmx-exporter.yaml index aeb9a2c031..72fedbcbbb 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/config-jmx-exporter.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/config-jmx-exporter.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-jmx-exporter + name: {{ include "common.release" . }}-jmx-exporter labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} data: config.yml: |- diff --git a/kubernetes/common/music/charts/zookeeper/templates/job-chroots.yaml b/kubernetes/common/music/charts/zookeeper/templates/job-chroots.yaml index b5b97233a0..b857a0d7b1 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/job-chroots.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/job-chroots.yaml @@ -12,7 +12,7 @@ metadata: labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} component: jobs job: chroots @@ -25,7 +25,7 @@ spec: metadata: labels: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} component: jobs job: chroots spec: diff --git a/kubernetes/common/music/charts/zookeeper/templates/poddisruptionbudget.yaml b/kubernetes/common/music/charts/zookeeper/templates/poddisruptionbudget.yaml index 7a9f3fe105..a4bc322a31 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/poddisruptionbudget.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/poddisruptionbudget.yaml @@ -5,13 +5,13 @@ metadata: labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} component: server spec: selector: matchLabels: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} component: server {{ toYaml .Values.podDisruptionBudget | indent 2 }} diff --git a/kubernetes/common/music/charts/zookeeper/templates/pv.yaml b/kubernetes/common/music/charts/zookeeper/templates/pv.yaml index 795ad3188b..6e53a9543d 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/pv.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/pv.yaml @@ -25,7 +25,7 @@ metadata: labels: app: {{ include "common.fullname" $global }} chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}" - release: "{{ $global.Release.Name }}" + release: "{{ include "common.release" $global }}" heritage: "{{ $global.Release.Service }}" name: {{ include "common.fullname" $global }} spec: @@ -36,7 +36,7 @@ spec: persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }} storageClassName: "{{ include "common.fullname" $global }}-data" hostPath: - path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.mountSubPath }}-{{$i}} + path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" $global }}/{{ $global.Values.persistence.mountSubPath }}-{{$i}} {{if ne $i (int $global.Values.replicaCount) }} --- {{- end -}} diff --git a/kubernetes/common/music/charts/zookeeper/templates/service-headless.yaml b/kubernetes/common/music/charts/zookeeper/templates/service-headless.yaml index 70ebf6013e..31475a1c76 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/service-headless.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/service-headless.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: clusterIP: None @@ -18,4 +18,4 @@ spec: {{- end }} selector: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/common/music/charts/zookeeper/templates/service.yaml b/kubernetes/common/music/charts/zookeeper/templates/service.yaml index 6ac3066ecf..0ef3a28b27 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/service.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/service.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} annotations: {{- with .Values.service.annotations }} @@ -20,4 +20,4 @@ spec: {{- end }} selector: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml b/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml index 580042d090..73224addef 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ template "common.name" . }} chart: {{ .Chart.Name }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} component: server spec: @@ -25,7 +25,7 @@ spec: selector: matchLabels: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} component: server updateStrategy: {{ toYaml .Values.updateStrategy | indent 4 }} @@ -33,7 +33,7 @@ spec: metadata: labels: app: {{ template "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} component: server {{- if .Values.podLabels }} ## Custom pod labels @@ -160,7 +160,7 @@ spec: {{- if .Values.exporters.jmx.enabled }} - name: config-jmx-exporter configMap: - name: {{ .Release.Name }}-jmx-exporter + name: {{ include "common.release" . }}-jmx-exporter {{- end }} {{- end }} {{- if .Values.persistence.enabled }} @@ -170,7 +170,7 @@ spec: labels: name: {{ include "common.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" + release: "{{ include "common.release" . }}" heritage: "{{ .Release.Service }}" spec: accessModes: |