2 # Copyright (c) 2017-2018 AT&T
3 # Modifications Copyright (c) 2018 Amdocs, Bell Canada
4 # Modifications Copyright (c) 2020 Nokia, Orange
5 # Modifications Copyright © 2023 Nordix Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 {{ if .Values.global.jobs.updateQueryData.enabled }}
25 name: {{ include "common.fullname" . }}-update-query-data
26 namespace: {{ include "common.namespace" . }}
28 app: {{ include "common.name" . }}
29 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
30 release: {{ include "common.release" . }}
31 heritage: {{ .Release.Service }}
32 {{ if .Values.global.jobs.migration.enabled }}
34 "helm.sh/hook": post-upgrade,post-rollback,post-install
35 "helm.sh/hook-weight": "2"
36 "helm.sh/hook-delete-policy": before-hook-creation
42 app: {{ include "common.name" . }}-job
43 release: {{ include "common.release" . }}
44 name: {{ include "common.name" . }}
57 fieldPath: metadata.namespace
58 image: {{ include "repositoryGenerator.image.readiness" . }}
59 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 name: {{ include "common.name" . }}-readiness
69 - name: {{ include "common.name" . }}-job
70 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 if [ ! -d /opt/aai/logroot/AAI-GQ/misc ]; then mkdir -p /opt/aai/logroot/AAI-GQ/misc; fi
78 until nc -w10 -z -v aai.{{.Release.Namespace}} 80; do echo "Retrying to reach aai on port 80"; done;
79 bash -x /opt/app/aai-traversal/docker-entrypoint.sh install/updateQueryData.sh ;
80 {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
84 value: {{ .Values.global.config.userId | quote }}
85 - name: LOCAL_GROUP_ID
86 value: {{ .Values.global.config.groupId | quote }}
87 resources: {{ include "common.resources" . | nindent 10 }}
89 - mountPath: /etc/localtime
92 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
93 name: {{ include "common.fullname" . }}-config
94 subPath: janusgraph-realtime.properties
95 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
96 name: {{ include "common.fullname" . }}-config
97 subPath: janusgraph-cached.properties
98 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
99 name: {{ include "common.fullname" . }}-config
100 subPath: aaiconfig.properties
101 - mountPath: /opt/aai/logroot/AAI-GQ/
102 name: {{ include "common.fullname" . }}-logs
103 - mountPath: /opt/aai/logroot/AAI-GQ/misc
104 name: {{ include "common.fullname" . }}-logs-misc
105 - mountPath: /opt/app/aai-traversal/resources/logback.xml
106 name: {{ include "common.fullname" . }}-config
108 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
109 name: {{ include "common.fullname" . }}-config
110 subPath: localhost-access-logback.xml
111 - mountPath: /opt/app/aai-traversal/resources/application.properties
112 name: {{ include "common.fullname" . }}-config
113 subPath: application.properties
114 # disable liveness probe when breakpoints set in debugger
115 # so K8s doesn't restart unresponsive container
116 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
121 - name: {{ include "common.fullname" . }}-logs
123 - name: {{ include "common.fullname" . }}-logs-misc
125 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
126 - name: {{ include "common.fullname" . }}-config
128 name: {{ include "common.fullname" . }}
129 restartPolicy: OnFailure
130 {{- include "common.imagePullSecrets" . | nindent 6 }}