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" . }}-migration
40 namespace: {{ include "common.namespace" . }}
42 app: {{ include "common.name" . }}-job
43 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
44 release: {{ include "common.release" . }}
45 heritage: {{ .Release.Service }}
47 "helm.sh/hook": post-upgrade,post-rollback,post-install
48 "helm.sh/hook-weight": "1"
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" . }}
64 {{- if .Values.global.cassandra.localCluster }}
76 fieldPath: metadata.namespace
77 image: {{ include "repositoryGenerator.image.readiness" . }}
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
79 name: {{ include "common.name" . }}-readiness
83 - bash docker-entrypoint.sh dataRestoreFromSnapshot.sh `ls -t /opt/app/aai-graphadmin/logs/data/dataSnapshots|head -1|awk -F".P" '{ print $1 }'`
86 value: {{ .Values.global.config.userId | quote }}
87 - name: LOCAL_GROUP_ID
88 value: {{ .Values.global.config.groupId | quote }}
90 - mountPath: /etc/localtime
93 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
94 name: {{ include "common.fullname" . }}-config
95 subPath: janusgraph-realtime.properties
96 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
97 name: {{ include "common.fullname" . }}-snapshots
98 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
99 name: {{ include "common.fullname" . }}-config
100 subPath: janusgraph-cached.properties
101 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
102 name: {{ include "common.fullname" . }}-config
103 subPath: aaiconfig.properties
104 - mountPath: /opt/aai/logroot/AAI-GA
105 name: {{ include "common.fullname" . }}-logs
106 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
107 name: {{ include "common.fullname" . }}-config
109 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
110 name: {{ include "common.fullname" . }}-config
111 subPath: localhost-access-logback.xml
112 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
113 name: {{ include "common.fullname" . }}-config
114 subPath: application.properties
116 {{ range $job := .Values.global.config.auth.files }}
117 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
118 name: {{ include "common.fullname" $global }}-auth-truststore-sec
121 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
122 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
123 name: {{ include "common.name" . }}-restore-backup
125 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
126 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
127 name: {{ include "common.name" . }}-perform-migration
131 - bash docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges
133 - name: LOCAL_USER_ID
134 value: {{ .Values.global.config.userId | quote }}
135 - name: LOCAL_GROUP_ID
136 value: {{ .Values.global.config.groupId | quote }}
138 - mountPath: /etc/localtime
141 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
142 name: {{ include "common.fullname" . }}-config
143 subPath: janusgraph-realtime.properties
144 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
145 name: {{ include "common.fullname" . }}-config
146 subPath: janusgraph-cached.properties
147 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
148 name: {{ include "common.fullname" . }}-config
149 subPath: aaiconfig.properties
150 - mountPath: /opt/aai/logroot/AAI-GA
151 name: {{ include "common.fullname" . }}-logs
152 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
153 name: {{ include "common.fullname" . }}-config
155 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
156 name: {{ include "common.fullname" . }}-config
157 subPath: localhost-access-logback.xml
158 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
159 name: {{ include "common.fullname" . }}-config
160 subPath: application.properties
162 {{ range $job := .Values.global.config.auth.files }}
163 - mountPath: /opt/app/aai-graphadmin/resources/etc/auth/{{ . }}
164 name: {{ include "common.fullname" $global }}-auth-truststore-sec
168 {{ include "common.resources" . }}
169 {{- if .Values.nodeSelector }}
171 {{ toYaml .Values.nodeSelector | indent 8 }}
173 {{- if .Values.affinity }}
175 {{ toYaml .Values.affinity | indent 8 }}
181 - name: filebeat-conf
184 - name: {{ include "common.fullname" . }}-logs
186 - name: {{ include "common.fullname" . }}-config
188 name: {{ include "common.fullname" . }}-configmap
189 - name: {{ include "common.fullname" . }}-snapshots
190 persistentVolumeClaim:
191 claimName: {{ include "common.fullname" . }}-migration
192 - name: {{ include "common.fullname" . }}-auth-truststore-sec
194 secretName: aai-common-truststore
196 {{ range $job := .Values.global.config.auth.files }}
202 - name: "{{ include "common.namespace" . }}-docker-registry-key"
207 name: {{ include "common.fullname" . }}-db-backup-job
208 namespace: {{ include "common.namespace" . }}
210 app: {{ include "common.name" . }}-db-backup-job
211 release: {{ include "common.release" . }}
212 heritage: {{ .Release.Service }}
213 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
215 "helm.sh/hook": pre-upgrade,pre-install
216 "helm.sh/hook-weight": "2"
217 "helm.sh/hook-delete-policy": before-hook-creation
223 app: {{ include "common.name" . }}-db-backup-job
224 release: {{ include "common.release" . }}
225 name: {{ include "common.name" . }}
227 {{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
232 - /app/ready.py --container-name aai-cassandra --timeout 1 || /app/ready.py --container-name cassandra
238 fieldPath: metadata.namespace
239 image: {{ include "repositoryGenerator.image.readiness" . }}
240 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
241 name: {{ include "common.name" . }}-db-backup-readiness
244 - name: {{ include "common.name" . }}-db-backup-job
245 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
246 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
249 - docker-entrypoint.sh
252 - name: LOCAL_USER_ID
253 value: {{ .Values.global.config.userId | quote }}
254 - name: LOCAL_GROUP_ID
255 value: {{ .Values.global.config.groupId | quote }}
257 - mountPath: /etc/localtime
260 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
261 name: {{ include "common.fullname" . }}-snapshots
262 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
263 name: {{ include "common.fullname" . }}-migration
264 subPath: janusgraph-migration-real.properties
265 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
266 name: {{ include "common.fullname" . }}-migration
267 subPath: janusgraph-migration-cached.properties
268 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
269 name: {{ include "common.fullname" . }}-config
270 subPath: aaiconfig.properties
271 - mountPath: /opt/aai/logroot/AAI-RES/
272 name: {{ include "common.fullname" . }}-logs
273 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
274 name: {{ include "common.fullname" . }}-config
276 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
277 name: {{ include "common.fullname" . }}-config
278 subPath: localhost-access-logback.xml
279 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
280 name: {{ include "common.fullname" . }}-config
281 subPath: application.properties
283 {{ include "common.resources" . | indent 10 }}
284 {{- if .Values.nodeSelector }}
286 {{ toYaml .Values.nodeSelector | indent 8 }}
288 {{- if .Values.affinity }}
290 {{ toYaml .Values.affinity | indent 8 }}
296 - name: {{ include "common.fullname" . }}-logs
298 - name: {{ include "common.fullname" . }}-config
300 name: {{ include "common.fullname" . }}-configmap
301 - name: {{ include "common.fullname" . }}-migration
303 name: {{ include "common.fullname" . }}-migration-configmap
304 - name: {{ include "common.fullname" . }}-snapshots
305 persistentVolumeClaim:
306 claimName: {{ include "common.fullname" . }}-migration
309 - name: "{{ include "common.namespace" . }}-docker-registry-key"