blob: 554b3c357e4639d3fefb3be1957574adefef655a [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
ChrisC32172342020-10-02 16:39:13 +020042 - "-t"
43 - "35"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000044 env:
45 - name: NAMESPACE
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.namespace
ChrisC32172342020-10-02 16:39:13 +020050 resources:
51 limits:
52 cpu: 100m
53 memory: 100Mi
54 requests:
55 cpu: 3m
56 memory: 20Mi
Mandeep Khindaa1047f42018-03-22 02:12:15 +000057 containers:
58 - name: {{ include "common.name" . }}-job
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000059 image: "{{ include "common.repository" . }}/{{ .Values.backendInitImage }}"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000060 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 volumeMounts:
62 - name: {{ include "common.fullname" . }}-environments
ChrisC7ab57312020-08-12 16:24:38 +020063 mountPath: /home/onap/chef-solo/environments/
MichaelMorrisb137f7e2020-03-15 17:44:48 +000064 - name: sdc-logs
65 mountPath: /var/lib/jetty/logs
Mandeep Khindaa1047f42018-03-22 02:12:15 +000066 env:
67 - name: ENVNAME
ChrisC742a7b22020-09-04 11:29:57 +020068 value: {{ .Values.env.name }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000069 - name: HOST_IP
70 valueFrom:
71 fieldRef:
72 fieldPath: status.podIP
ChrisC32172342020-10-02 16:39:13 +020073 resources:
74 limits:
75 cpu: 800m
76 memory: 1024Mi
77 requests:
78 cpu: 200m
79 memory: 200Mi
Mandeep Khindaa1047f42018-03-22 02:12:15 +000080 volumes:
81 - name: {{ include "common.fullname" . }}-environments
82 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010083 name: {{ include "common.release" . }}-sdc-environments-configmap
Mandeep Khindaa1047f42018-03-22 02:12:15 +000084 defaultMode: 0755
MichaelMorrisb137f7e2020-03-15 17:44:48 +000085 - name: sdc-logs
86 emptyDir: {}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000087 imagePullSecrets:
88 - name: "{{ include "common.namespace" . }}-docker-registry-key"
89 restartPolicy: Never