blob: f1bdabb59c3c7f531f270d3d4ec5f5ad5d6df731 [file] [log] [blame]
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00001# Copyright © 2017 Amdocs, AT&T, Bell Canada
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Modifications Copyright © 2018 ZTE
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Mandeep Khindaa1047f42018-03-22 02:12:15 +000016apiVersion: batch/v1
17kind: Job
18metadata:
19 name: {{ include "common.fullname" . }}-config-backend
20 namespace: {{ include "common.namespace" . }}
gummara72e6de2020-03-12 11:15:56 +000021 labels: {{- include "common.labels" . | nindent 4 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000022spec:
Mike Elliott6482f502018-04-30 15:02:43 -040023 backoffLimit: 20
Mandeep Khindaa1047f42018-03-22 02:12:15 +000024 template:
25 metadata:
26 labels:
gummara72e6de2020-03-12 11:15:56 +000027 app.kubernetes.io/name: {{ include "common.name" . }}-job
28 helm.sh/chart: {{ include "common.chart" . }}
29 app.kubernetes.io/instance: {{ include "common.release" . }}
30 app.kubernetes.io/managed-by: {{ .Release.Service }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000031 spec:
32 restartPolicy: Never
33 initContainers:
34 - name: {{ include "common.name" . }}-init-readiness
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020035 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000036 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
37 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020038 - /app/ready.py
Mandeep Khindaa1047f42018-03-22 02:12:15 +000039 args:
40 - --container-name
41 - sdc-be
42 env:
43 - name: NAMESPACE
44 valueFrom:
45 fieldRef:
46 apiVersion: v1
47 fieldPath: metadata.namespace
48 containers:
49 - name: {{ include "common.name" . }}-job
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000050 image: "{{ include "common.repository" . }}/{{ .Values.backendInitImage }}"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000051 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 volumeMounts:
53 - name: {{ include "common.fullname" . }}-environments
ChrisC7ab57312020-08-12 16:24:38 +020054 mountPath: /home/onap/chef-solo/environments/
MichaelMorrisb137f7e2020-03-15 17:44:48 +000055 - name: sdc-logs
56 mountPath: /var/lib/jetty/logs
Mandeep Khindaa1047f42018-03-22 02:12:15 +000057 env:
58 - name: ENVNAME
ChrisC742a7b22020-09-04 11:29:57 +020059 value: {{ .Values.env.name }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000060 - name: HOST_IP
61 valueFrom:
62 fieldRef:
63 fieldPath: status.podIP
Mandeep Khindaa1047f42018-03-22 02:12:15 +000064 volumes:
65 - name: {{ include "common.fullname" . }}-environments
66 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010067 name: {{ include "common.release" . }}-sdc-environments-configmap
Mandeep Khindaa1047f42018-03-22 02:12:15 +000068 defaultMode: 0755
MichaelMorrisb137f7e2020-03-15 17:44:48 +000069 - name: sdc-logs
70 emptyDir: {}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000071 imagePullSecrets:
72 - name: "{{ include "common.namespace" . }}-docker-registry-key"
73 restartPolicy: Never