blob: a540f4567c4cd3cca73a9492dba89f9963603604 [file] [log] [blame]
rameshiyer2707004862023-01-23 11:50:01 +00001{{/*
rameshiyer277bfa0fd2024-06-11 16:51:57 +00002# Copyright (C) 2023-2024 Nordix Foundation.
rameshiyer2707004862023-01-23 11:50:01 +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*/}}
16
17apiVersion: batch/v1
18kind: Job
19metadata:
20 name: policy-csit-robot-test
21 namespace: default
22 labels:
23 app: policy-csit-robot-test
24spec:
25 template:
26 spec:
27 initContainers:
28 - name: policy-pods-readiness
29 image: {{ .Values.imageCredentials.readinessImage.name }}
30 imagePullPolicy: {{ .Values.image.pullPolicy }}
31 command:
rameshiyer2762ccbbb2023-02-01 15:06:45 +000032 - /app/ready.py
33 args:
34 {{- range $container := .Values.readiness }}
35 - --container-name
36 - {{ $container}}
37 {{- end }}
rameshiyer2765fc3752023-04-05 13:47:15 +010038 - --timeout
39 - "15"
rameshiyer2707004862023-01-23 11:50:01 +000040 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 containers:
47 - name: {{ .Chart.Name }}-test
48 image: {{ .Values.imageCredentials.csitTestImage.name }}
49 imagePullPolicy: Never
50 env:
51 - name: ROBOT_FILE
rameshiyer277bfa0fd2024-06-11 16:51:57 +000052 value: {{ .Values.robot }}
rameshiyer274f25dde2024-06-13 13:52:16 +000053 - name: TEST_ENV
54 value: "k8s"
adheli.tavares80e382e2024-05-01 14:08:35 +010055 command: [ "./run-test.sh" ]
rameshiyer276ebe5b62023-02-14 17:52:49 +000056 volumeMounts:
57 - name: robot-csit-pv
58 mountPath: /tmp
rameshiyer2765fc3752023-04-05 13:47:15 +010059 restartPolicy: OnFailure
rameshiyer276ebe5b62023-02-14 17:52:49 +000060 volumes:
61 - name: robot-csit-pv
62 hostPath:
rameshiyer277bfa0fd2024-06-11 16:51:57 +000063 path: {{ .Values.robotLogDir }}