Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 3 | # Modifications Copyright © 2018 ZTE |
Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 16 | */}} |
Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 17 | |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 18 | apiVersion: batch/v1 |
| 19 | kind: Job |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 20 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 21 | spec: |
Mike Elliott | 6482f50 | 2018-04-30 15:02:43 -0400 | [diff] [blame] | 22 | backoffLimit: 20 |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 23 | template: |
| 24 | metadata: |
| 25 | labels: |
gummar | a72e6de | 2020-03-12 11:15:56 +0000 | [diff] [blame] | 26 | app.kubernetes.io/name: {{ include "common.name" . }}-job |
| 27 | helm.sh/chart: {{ include "common.chart" . }} |
| 28 | app.kubernetes.io/instance: {{ include "common.release" . }} |
| 29 | app.kubernetes.io/managed-by: {{ .Release.Service }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 30 | spec: |
| 31 | restartPolicy: Never |
| 32 | initContainers: |
| 33 | - name: {{ include "common.name" . }}-init-readiness |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 34 | image: {{ include "repositoryGenerator.image.readiness" . }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 35 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 36 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 37 | - /app/ready.py |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 38 | args: |
| 39 | - --container-name |
| 40 | - sdc-be |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 41 | - "-t" |
| 42 | - "35" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 49 | resources: |
| 50 | limits: |
| 51 | cpu: 100m |
| 52 | memory: 100Mi |
| 53 | requests: |
| 54 | cpu: 3m |
| 55 | memory: 20Mi |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 56 | containers: |
| 57 | - name: {{ include "common.name" . }}-job |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 58 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.backendInitImage }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 60 | volumeMounts: |
| 61 | - name: {{ include "common.fullname" . }}-environments |
ChrisC | 7ab5731 | 2020-08-12 16:24:38 +0200 | [diff] [blame] | 62 | mountPath: /home/onap/chef-solo/environments/ |
MichaelMorris | b137f7e | 2020-03-15 17:44:48 +0000 | [diff] [blame] | 63 | - name: sdc-logs |
Joanna Jeremicz | fe52bf5 | 2021-04-21 14:31:29 +0200 | [diff] [blame] | 64 | mountPath: /home/onap/logs |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 65 | env: |
| 66 | - name: ENVNAME |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 67 | value: {{ .Values.env.name }} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 68 | - name: HOST_IP |
| 69 | valueFrom: |
| 70 | fieldRef: |
| 71 | fieldPath: status.podIP |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 72 | resources: |
| 73 | limits: |
| 74 | cpu: 800m |
| 75 | memory: 1024Mi |
| 76 | requests: |
| 77 | cpu: 200m |
| 78 | memory: 200Mi |
othman touijer | 2b764d0 | 2022-01-05 14:40:37 +0100 | [diff] [blame] | 79 | {{ include "common.waitForJobContainer" . | indent 6 | trim }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 80 | volumes: |
| 81 | - name: {{ include "common.fullname" . }}-environments |
| 82 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 83 | name: {{ include "common.release" . }}-sdc-environments-configmap |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 84 | defaultMode: 0755 |
MichaelMorris | b137f7e | 2020-03-15 17:44:48 +0000 | [diff] [blame] | 85 | - name: sdc-logs |
| 86 | emptyDir: {} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 87 | imagePullSecrets: |
| 88 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |