aboutsummaryrefslogtreecommitdiffstats
path: root/components/aai-graphadmin/templates
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-01-24 23:29:13 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2020-01-24 23:29:13 +0100
commit1c9c9bba658057f6147276fba4f84e7db9117e70 (patch)
tree382a21300cb33cc0660baf150dc575725517467b /components/aai-graphadmin/templates
parentf636b1cc2bf7d391dc76956e906a6f497ef1b092 (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: I450057f5b4a10842f09665ecccc58e4ed727cd89
Diffstat (limited to 'components/aai-graphadmin/templates')
-rw-r--r--components/aai-graphadmin/templates/configmap.yaml4
-rw-r--r--components/aai-graphadmin/templates/deployment.yaml8
-rw-r--r--components/aai-graphadmin/templates/job-copy-db-backup.yaml4
-rw-r--r--components/aai-graphadmin/templates/job-create-db.yaml4
-rw-r--r--components/aai-graphadmin/templates/job-migration.yaml8
-rw-r--r--components/aai-graphadmin/templates/pv.yaml4
-rw-r--r--components/aai-graphadmin/templates/pvc.yaml2
-rw-r--r--components/aai-graphadmin/templates/service.yaml4
8 files changed, 19 insertions, 19 deletions
diff --git a/components/aai-graphadmin/templates/configmap.yaml b/components/aai-graphadmin/templates/configmap.yaml
index bd229d3..e704743 100644
--- a/components/aai-graphadmin/templates/configmap.yaml
+++ b/components/aai-graphadmin/templates/configmap.yaml
@@ -25,7 +25,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
{{- if .Values.global.jobs.migration.enabled }}
annotations:
@@ -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 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
diff --git a/components/aai-graphadmin/templates/deployment.yaml b/components/aai-graphadmin/templates/deployment.yaml
index f768603..a86fefa 100644
--- a/components/aai-graphadmin/templates/deployment.yaml
+++ b/components/aai-graphadmin/templates/deployment.yaml
@@ -24,7 +24,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 }}
@@ -35,7 +35,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 }}
@@ -48,12 +48,12 @@ spec:
- /root/job_complete.py
args:
- --job-name
- - {{ .Release.Name }}-aai-graphadmin-migration
+ - {{ include "common.release" . }}-aai-graphadmin-migration
{{ else if .Values.global.jobs.createSchema.enabled }}
- /root/job_complete.py
args:
- --job-name
- - {{ .Release.Name }}-aai-graphadmin-create-db-schema
+ - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
{{ else }}
- /root/ready.py
args:
diff --git a/components/aai-graphadmin/templates/job-copy-db-backup.yaml b/components/aai-graphadmin/templates/job-copy-db-backup.yaml
index 80ccca3..ba74ef1 100644
--- a/components/aai-graphadmin/templates/job-copy-db-backup.yaml
+++ b/components/aai-graphadmin/templates/job-copy-db-backup.yaml
@@ -38,7 +38,7 @@ metadata:
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
annotations:
@@ -51,7 +51,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
name: {{ include "common.name" . }}
spec:
{{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
diff --git a/components/aai-graphadmin/templates/job-create-db.yaml b/components/aai-graphadmin/templates/job-create-db.yaml
index 1647260..2ab57b6 100644
--- a/components/aai-graphadmin/templates/job-create-db.yaml
+++ b/components/aai-graphadmin/templates/job-create-db.yaml
@@ -38,7 +38,7 @@ metadata:
labels:
app: {{ include "common.name" . }}-job
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
backoffLimit: 20
@@ -46,7 +46,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
name: {{ include "common.name" . }}
spec:
initContainers:
diff --git a/components/aai-graphadmin/templates/job-migration.yaml b/components/aai-graphadmin/templates/job-migration.yaml
index 9815e66..37740be 100644
--- a/components/aai-graphadmin/templates/job-migration.yaml
+++ b/components/aai-graphadmin/templates/job-migration.yaml
@@ -39,7 +39,7 @@ metadata:
labels:
app: {{ include "common.name" . }}-job
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
annotations:
"helm.sh/hook": post-upgrade,post-rollback,post-install
@@ -51,7 +51,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
name: {{ include "common.name" . }}
spec:
initContainers:
@@ -206,7 +206,7 @@ metadata:
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}-db-backup-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
annotations:
@@ -219,7 +219,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}-db-backup-job
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
name: {{ include "common.name" . }}
spec:
{{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
diff --git a/components/aai-graphadmin/templates/pv.yaml b/components/aai-graphadmin/templates/pv.yaml
index e790e6a..563b920 100644
--- a/components/aai-graphadmin/templates/pv.yaml
+++ b/components/aai-graphadmin/templates/pv.yaml
@@ -24,7 +24,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" . }}
annotations:
@@ -39,6 +39,6 @@ spec:
persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
storageClassName: "{{ include "common.fullname" . }}-data"
hostPath:
- path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath1 }}
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath1 }}
{{- end -}}
{{- end -}}
diff --git a/components/aai-graphadmin/templates/pvc.yaml b/components/aai-graphadmin/templates/pvc.yaml
index 14e07d1..bf89006 100644
--- a/components/aai-graphadmin/templates/pvc.yaml
+++ b/components/aai-graphadmin/templates/pvc.yaml
@@ -23,7 +23,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ .Release.Name }}"
+ release: "{{ include "common.release" . }}"
heritage: "{{ .Release.Service }}"
annotations:
"helm.sh/hook": pre-upgrade,pre-install
diff --git a/components/aai-graphadmin/templates/service.yaml b/components/aai-graphadmin/templates/service.yaml
index f4d9ba5..ab6c677 100644
--- a/components/aai-graphadmin/templates/service.yaml
+++ b/components/aai-graphadmin/templates/service.yaml
@@ -25,7 +25,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 }}
@@ -45,5 +45,5 @@ spec:
{{- end}}
selector:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
clusterIP: None