3 # ============LICENSE_START=======================================================
5 # ================================================================================
6 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
7 # Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.
8 # Copyright (c) 2020 Orange Intellectual Property. All rights reserved.
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
14 # http://www.apache.org/licenses/LICENSE-2.0
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
23 # In ONAP, the following job will always be run on each installation
24 # The following job will go through the latest oxm and
25 # create properties based on the data type defined in the oxm
26 # and create the required indexes for the appropriate properties
27 # This can be run multiple times as the code if the index or property already exists
28 # then the index or property won't be created again
29 # NOTE - During the execution of the createSchema job, there should
30 # be no other janusgraph connection to the graph as its the reason
31 # that resources traversal and graphadmin wait until this job is done
32 # If you are using an existing cassandra cluster not coming from oom
33 # then it is your job to ensure that there are no connections to the database
36 {{- if .Values.global.jobs.migration.enabled }}
41 name: {{ include "common.fullname" . }}-migration
42 namespace: {{ include "common.namespace" . }}
44 app: {{ include "common.name" . }}-job
45 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
46 release: {{ include "common.release" . }}
47 heritage: {{ .Release.Service }}
49 "helm.sh/hook": post-upgrade,post-rollback,post-install
50 "helm.sh/hook-weight": "1"
51 "helm.sh/hook-delete-policy": before-hook-creation
57 app: {{ include "common.name" . }}-job
58 release: {{ include "common.release" . }}
59 name: {{ include "common.name" . }}
66 {{- if .Values.global.cassandra.localCluster }}
78 fieldPath: metadata.namespace
79 image: {{ include "repositoryGenerator.image.readiness" . }}
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 name: {{ include "common.name" . }}-readiness
85 - bash docker-entrypoint.sh dataRestoreFromSnapshot.sh `ls -t /opt/app/aai-graphadmin/logs/data/dataSnapshots|head -1|awk -F".P" '{ print $1 }'`
88 value: {{ .Values.global.config.userId | quote }}
89 - name: LOCAL_GROUP_ID
90 value: {{ .Values.global.config.groupId | quote }}
92 - mountPath: /etc/localtime
95 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
96 name: {{ include "common.fullname" . }}-config
97 subPath: janusgraph-realtime.properties
98 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
99 name: {{ include "common.fullname" . }}-snapshots
100 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
101 name: {{ include "common.fullname" . }}-config
102 subPath: janusgraph-cached.properties
103 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
104 name: {{ include "common.fullname" . }}-config
105 subPath: aaiconfig.properties
106 - mountPath: /opt/aai/logroot/AAI-GA
107 name: {{ include "common.fullname" . }}-logs
108 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
109 name: {{ include "common.fullname" . }}-config
111 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
112 name: {{ include "common.fullname" . }}-config
113 subPath: localhost-access-logback.xml
114 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
115 name: {{ include "common.fullname" . }}-config
116 subPath: application.properties
118 {{ range $job := .Values.global.config.auth.files }}
119 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
120 name: {{ include "common.fullname" $global }}-auth-truststore-sec
123 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
124 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
125 name: {{ include "common.name" . }}-restore-backup
127 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
128 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
129 name: {{ include "common.name" . }}-perform-migration
133 - bash docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges
135 - name: LOCAL_USER_ID
136 value: {{ .Values.global.config.userId | quote }}
137 - name: LOCAL_GROUP_ID
138 value: {{ .Values.global.config.groupId | quote }}
140 - mountPath: /etc/localtime
143 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
144 name: {{ include "common.fullname" . }}-config
145 subPath: janusgraph-realtime.properties
146 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
147 name: {{ include "common.fullname" . }}-config
148 subPath: janusgraph-cached.properties
149 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
150 name: {{ include "common.fullname" . }}-config
151 subPath: aaiconfig.properties
152 - mountPath: /opt/aai/logroot/AAI-GA
153 name: {{ include "common.fullname" . }}-logs
154 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
155 name: {{ include "common.fullname" . }}-config
157 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
158 name: {{ include "common.fullname" . }}-config
159 subPath: localhost-access-logback.xml
160 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
161 name: {{ include "common.fullname" . }}-config
162 subPath: application.properties
164 {{ range $job := .Values.global.config.auth.files }}
165 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
166 name: {{ include "common.fullname" $global }}-auth-truststore-sec
170 {{ include "common.resources" . }}
171 {{- if .Values.nodeSelector }}
173 {{ toYaml .Values.nodeSelector | indent 8 }}
175 {{- if .Values.affinity }}
177 {{ toYaml .Values.affinity | indent 8 }}
183 - name: filebeat-conf
186 - name: {{ include "common.fullname" . }}-logs
188 - name: {{ include "common.fullname" . }}-config
190 name: {{ include "common.fullname" . }}-configmap
191 - name: {{ include "common.fullname" . }}-snapshots
192 persistentVolumeClaim:
193 claimName: {{ include "common.fullname" . }}-migration
194 - name: {{ include "common.fullname" . }}-auth-truststore-sec
196 secretName: aai-common-truststore
198 {{ range $job := .Values.global.config.auth.files }}
204 - name: "{{ include "common.namespace" . }}-docker-registry-key"
209 name: {{ include "common.fullname" . }}-db-backup-job
210 namespace: {{ include "common.namespace" . }}
212 app: {{ include "common.name" . }}-db-backup-job
213 release: {{ include "common.release" . }}
214 heritage: {{ .Release.Service }}
215 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
217 "helm.sh/hook": pre-upgrade,pre-install
218 "helm.sh/hook-weight": "2"
219 "helm.sh/hook-delete-policy": before-hook-creation
225 app: {{ include "common.name" . }}-db-backup-job
226 release: {{ include "common.release" . }}
227 name: {{ include "common.name" . }}
229 {{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
234 - /app/ready.py --container-name aai-cassandra --timeout 1 || /app/ready.py --container-name cassandra
240 fieldPath: metadata.namespace
241 image: {{ include "repositoryGenerator.image.readiness" . }}
242 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
243 name: {{ include "common.name" . }}-db-backup-readiness
246 - name: {{ include "common.name" . }}-db-backup-job
247 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
248 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
251 - docker-entrypoint.sh
254 - name: LOCAL_USER_ID
255 value: {{ .Values.global.config.userId | quote }}
256 - name: LOCAL_GROUP_ID
257 value: {{ .Values.global.config.groupId | quote }}
259 - mountPath: /etc/localtime
262 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
263 name: {{ include "common.fullname" . }}-snapshots
264 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
265 name: {{ include "common.fullname" . }}-migration
266 subPath: janusgraph-migration-real.properties
267 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
268 name: {{ include "common.fullname" . }}-migration
269 subPath: janusgraph-migration-cached.properties
270 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
271 name: {{ include "common.fullname" . }}-config
272 subPath: aaiconfig.properties
273 - mountPath: /opt/aai/logroot/AAI-RES/
274 name: {{ include "common.fullname" . }}-logs
275 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
276 name: {{ include "common.fullname" . }}-config
278 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
279 name: {{ include "common.fullname" . }}-config
280 subPath: localhost-access-logback.xml
281 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
282 name: {{ include "common.fullname" . }}-config
283 subPath: application.properties
285 {{ include "common.resources" . | indent 10 }}
286 {{- if .Values.nodeSelector }}
288 {{ toYaml .Values.nodeSelector | indent 8 }}
290 {{- if .Values.affinity }}
292 {{ toYaml .Values.affinity | indent 8 }}
298 - name: {{ include "common.fullname" . }}-logs
300 - name: {{ include "common.fullname" . }}-config
302 name: {{ include "common.fullname" . }}-configmap
303 - name: {{ include "common.fullname" . }}-migration
305 name: {{ include "common.fullname" . }}-migration-configmap
306 - name: {{ include "common.fullname" . }}-snapshots
307 persistentVolumeClaim:
308 claimName: {{ include "common.fullname" . }}-migration
311 - name: "{{ include "common.namespace" . }}-docker-registry-key"