2 # ============LICENSE_START=======================================================
4 # ================================================================================
5 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 # Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.
7 # Copyright (c) 2020 Orange Intellectual Property. All rights reserved.
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END=========================================================
22 # In ONAP, the following job will always be run on each installation
23 # The following job will go through the latest oxm and
24 # create properties based on the data type defined in the oxm
25 # and create the required indexes for the appropriate properties
26 # This can be run multiple times as the code if the index or property already exists
27 # then the index or property won't be created again
28 # NOTE - During the execution of the createSchema job, there should
29 # be no other janusgraph connection to the graph as its the reason
30 # that resources traversal and graphadmin wait until this job is done
31 # If you are using an existing cassandra cluster not coming from oom
32 # then it is your job to ensure that there are no connections to the database
34 {{- if .Values.global.jobs.migration.enabled }}
39 name: {{ include "common.fullname" . }}-db-backup
40 namespace: {{ include "common.namespace" . }}
42 app: {{ include "common.name" . }}-job
43 release: {{ include "common.release" . }}
44 heritage: {{ .Release.Service }}
45 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
47 "helm.sh/hook": pre-upgrade,pre-install
48 "helm.sh/hook-weight": "2"
49 "helm.sh/hook-delete-policy": before-hook-creation
55 app: {{ include "common.name" . }}-job
56 release: {{ include "common.release" . }}
57 name: {{ include "common.name" . }}
59 {{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
64 - /app/ready.py --container-name aai-cassandra --timeout 1 || /app/ready.py --container-name cassandra
70 fieldPath: metadata.namespace
71 image: {{ include "repositoryGenerator.image.readiness" . }}
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 name: {{ include "common.name" . }}-db-backup-readiness
76 - name: {{ include "common.name" . }}-db-backup-job
77 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 - docker-entrypoint.sh
85 value: {{ .Values.global.config.userId | quote }}
86 - name: LOCAL_GROUP_ID
87 value: {{ .Values.global.config.groupId | quote }}
89 - mountPath: /etc/localtime
92 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
93 name: {{ include "common.fullname" . }}-snapshots
94 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
95 name: {{ include "common.fullname" . }}-migration
96 subPath: janusgraph-migration-real.properties
97 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
98 name: {{ include "common.fullname" . }}-migration
99 subPath: janusgraph-migration-cached.properties
100 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
101 name: {{ include "common.fullname" . }}-config
102 subPath: aaiconfig.properties
103 - mountPath: /opt/aai/logroot/AAI-RES/
104 name: {{ include "common.fullname" . }}-logs
105 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
106 name: {{ include "common.fullname" . }}-config
108 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
109 name: {{ include "common.fullname" . }}-config
110 subPath: localhost-access-logback.xml
111 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
112 name: {{ include "common.fullname" . }}-config
113 subPath: application.properties
115 {{ include "common.resources" . | indent 10 }}
116 {{- if .Values.nodeSelector }}
118 {{ toYaml .Values.nodeSelector | indent 8 }}
120 {{- if .Values.affinity }}
122 {{ toYaml .Values.affinity | indent 8 }}
128 - name: {{ include "common.fullname" . }}-logs
130 - name: {{ include "common.fullname" . }}-config
132 name: {{ include "common.fullname" . }}-configmap
133 - name: {{ include "common.fullname" . }}-migration
135 name: {{ include "common.fullname" . }}-migration-configmap
136 - name: {{ include "common.fullname" . }}-snapshots
137 persistentVolumeClaim:
138 claimName: {{ include "common.fullname" . }}-migration
141 - name: "{{ include "common.namespace" . }}-docker-registry-key"