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 # ================================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END=========================================================
21 # In ONAP, the following job will always be run on each installation
22 # The following job will go through the latest oxm and
23 # create properties based on the data type defined in the oxm
24 # and create the required indexes for the appropriate properties
25 # This can be run multiple times as the code if the index or property already exists
26 # then the index or property won't be created again
27 # NOTE - During the execution of the createSchema job, there should
28 # be no other janusgraph connection to the graph as its the reason
29 # that resources traversal and graphadmin wait until this job is done
30 # If you are using an existing cassandra cluster not coming from oom
31 # then it is your job to ensure that there are no connections to the database
33 {{- if .Values.global.jobs.migration.enabled }}
38 name: {{ include "common.fullname" . }}-db-backup
39 namespace: {{ include "common.namespace" . }}
41 app: {{ include "common.name" . }}-job
42 release: {{ include "common.release" . }}
43 heritage: {{ .Release.Service }}
44 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
46 "helm.sh/hook": pre-upgrade,pre-install
47 "helm.sh/hook-weight": "2"
48 "helm.sh/hook-delete-policy": before-hook-creation
54 app: {{ include "common.name" . }}-job
55 release: {{ include "common.release" . }}
56 name: {{ include "common.name" . }}
58 {{ if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
63 - /app/ready.py --container-name aai-cassandra --timeout 1 || /app/ready.py --container-name cassandra
69 fieldPath: metadata.namespace
70 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 name: {{ include "common.name" . }}-db-backup-readiness
75 - name: {{ include "common.name" . }}-db-backup-job
76 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 - docker-entrypoint.sh
84 value: {{ .Values.global.config.userId | quote }}
85 - name: LOCAL_GROUP_ID
86 value: {{ .Values.global.config.groupId | quote }}
88 - mountPath: /etc/localtime
91 - mountPath: /opt/app/aai-graphadmin/logs/data/dataSnapshots
92 name: {{ include "common.fullname" . }}-snapshots
93 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
94 name: {{ include "common.fullname" . }}-migration
95 subPath: janusgraph-migration-real.properties
96 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-cached.properties
97 name: {{ include "common.fullname" . }}-migration
98 subPath: janusgraph-migration-cached.properties
99 - mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/aaiconfig.properties
100 name: {{ include "common.fullname" . }}-config
101 subPath: aaiconfig.properties
102 - mountPath: /opt/aai/logroot/AAI-RES/
103 name: {{ include "common.fullname" . }}-logs
104 - mountPath: /opt/app/aai-graphadmin/resources/logback.xml
105 name: {{ include "common.fullname" . }}-config
107 - mountPath: /opt/app/aai-graphadmin/resources/localhost-access-logback.xml
108 name: {{ include "common.fullname" . }}-config
109 subPath: localhost-access-logback.xml
110 - mountPath: /opt/app/aai-graphadmin/resources/application.properties
111 name: {{ include "common.fullname" . }}-config
112 subPath: application.properties
114 {{ include "common.resources" . | indent 10 }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 8 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 8 }}
127 - name: {{ include "common.fullname" . }}-logs
129 - name: {{ include "common.fullname" . }}-config
131 name: {{ include "common.fullname" . }}-configmap
132 - name: {{ include "common.fullname" . }}-migration
134 name: {{ include "common.fullname" . }}-migration-configmap
135 - name: {{ include "common.fullname" . }}-snapshots
136 persistentVolumeClaim:
137 claimName: {{ include "common.fullname" . }}-migration
140 - name: "{{ include "common.namespace" . }}-docker-registry-key"