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/oof/charts/oof-cmso | |
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/oof/charts/oof-cmso')
14 files changed, 32 insertions, 32 deletions
diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/configmap.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/configmap.yaml index c4397359dc..e4d0a5c256 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/configmap.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/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 "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml index e28dfca453..0e6b4c8791 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/deployment.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: replicas: {{ .Values.replicaCount }} @@ -28,7 +28,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: @@ -60,7 +60,7 @@ spec: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: {{ .Release.Name}}-cmso-db + name: {{ include "common.release" . }}-cmso-db key: db-root-password terminationMessagePolicy: File volumeMounts: @@ -84,7 +84,7 @@ spec: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: {{ .Release.Name}}-cmso-db + name: {{ include "common.release" . }}-cmso-db key: db-root-password - name: JAVA_TRUSTSTORE value: /share/etc/certs/{{ .Values.global.truststoreFile }} @@ -150,6 +150,6 @@ spec: emptyDir: {} - name: {{ include "common.fullname" . }}-certs secret: - secretName: {{ .Release.Name }}-{{ .Values.global.commonConfigPrefix }}-certs + secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/service.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/service.yaml index 1624a08b27..d0b586acf7 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/templates/service.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-optimizer/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 }} @@ -36,4 +36,4 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/configmap.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/configmap.yaml index c4397359dc..e4d0a5c256 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/configmap.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-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 "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/deployment.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/deployment.yaml index 1b17ed2ae4..e7b5eed924 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/deployment.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: replicas: {{ .Values.replicaCount }} @@ -28,7 +28,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: @@ -60,7 +60,7 @@ spec: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: {{ .Release.Name}}-cmso-db + name: {{ include "common.release" . }}-cmso-db key: db-root-password terminationMessagePolicy: File volumeMounts: @@ -108,7 +108,7 @@ spec: - name: DB_PASSWORD valueFrom: secretKeyRef: - name: {{ .Release.Name}}-cmso-db + name: {{ include "common.release" . }}-cmso-db key: user-password - name: JAVA_TRUSTSTORE value: /share/etc/certs/{{ .Values.global.truststoreFile }} @@ -180,9 +180,9 @@ spec: emptyDir: {} - name: filebeat-conf configMap: - name: {{ .Release.Name }}-cmso-filebeat-configmap + name: {{ include "common.release" . }}-cmso-filebeat-configmap - name: {{ include "common.fullname" . }}-certs secret: - secretName: {{ .Release.Name }}-{{ .Values.global.commonConfigPrefix }}-certs + secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/service.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/service.yaml index 1624a08b27..d0b586acf7 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-service/templates/service.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-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 }} @@ -36,4 +36,4 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/configmap.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/configmap.yaml index c4397359dc..e4d0a5c256 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/configmap.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/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 "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/deployment.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/deployment.yaml index 38a8c929d5..53d1b26755 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/deployment.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: replicas: {{ .Values.replicaCount }} @@ -28,7 +28,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: containers: - name: {{ include "common.name" . }} @@ -97,6 +97,6 @@ spec: emptyDir: {} - name: {{ include "common.fullname" . }}-certs secret: - secretName: {{ .Release.Name }}-{{ .Values.global.commonConfigPrefix }}-certs + secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/service.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/service.yaml index 1624a08b27..d0b586acf7 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/templates/service.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-ticketmgt/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 }} @@ -36,4 +36,4 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/configmap.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/configmap.yaml index c4397359dc..e4d0a5c256 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/configmap.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/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 "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/deployment.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/deployment.yaml index 2b36b296cd..8cc4a986c5 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/deployment.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: replicas: {{ .Values.replicaCount }} @@ -28,7 +28,7 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: containers: - name: {{ include "common.name" . }} @@ -97,6 +97,6 @@ spec: emptyDir: {} - name: {{ include "common.fullname" . }}-certs secret: - secretName: {{ .Release.Name }}-{{ .Values.global.commonConfigPrefix }}-certs + secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/service.yaml b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/service.yaml index 1624a08b27..d0b586acf7 100644 --- a/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/templates/service.yaml +++ b/kubernetes/oof/charts/oof-cmso/charts/oof-cmso-topology/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 }} @@ -36,4 +36,4 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} diff --git a/kubernetes/oof/charts/oof-cmso/templates/configmap.yaml b/kubernetes/oof/charts/oof-cmso/templates/configmap.yaml index f906fac23e..f4a79627f6 100644 --- a/kubernetes/oof/charts/oof-cmso/templates/configmap.yaml +++ b/kubernetes/oof/charts/oof-cmso/templates/configmap.yaml @@ -16,12 +16,12 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-cmso-filebeat-configmap + name: {{ include "common.release" . }}-cmso-filebeat-configmap namespace: {{ include "common.namespace" . }} 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/log/filebeat/*").AsConfig . | indent 2 }} diff --git a/kubernetes/oof/charts/oof-cmso/templates/secret.yaml b/kubernetes/oof/charts/oof-cmso/templates/secret.yaml index a742914c49..11a9221fed 100644 --- a/kubernetes/oof/charts/oof-cmso/templates/secret.yaml +++ b/kubernetes/oof/charts/oof-cmso/templates/secret.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 }} type: Opaque data: |