rameshiyer27 | 0700486 | 2023-01-23 11:50:01 +0000 | [diff] [blame] | 1 | {{/* |
rameshiyer27 | 7bfa0fd | 2024-06-11 16:51:57 +0000 | [diff] [blame] | 2 | # Copyright (C) 2023-2024 Nordix Foundation. |
rameshiyer27 | 0700486 | 2023-01-23 11:50:01 +0000 | [diff] [blame] | 3 | # |
| 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 | |
| 17 | apiVersion: batch/v1 |
| 18 | kind: Job |
| 19 | metadata: |
| 20 | name: policy-csit-robot-test |
| 21 | namespace: default |
| 22 | labels: |
| 23 | app: policy-csit-robot-test |
| 24 | spec: |
| 25 | template: |
| 26 | spec: |
| 27 | initContainers: |
| 28 | - name: policy-pods-readiness |
| 29 | image: {{ .Values.imageCredentials.readinessImage.name }} |
| 30 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 31 | command: |
rameshiyer27 | 62ccbbb | 2023-02-01 15:06:45 +0000 | [diff] [blame] | 32 | - /app/ready.py |
| 33 | args: |
| 34 | {{- range $container := .Values.readiness }} |
| 35 | - --container-name |
| 36 | - {{ $container}} |
| 37 | {{- end }} |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame] | 38 | - --timeout |
| 39 | - "15" |
rameshiyer27 | 0700486 | 2023-01-23 11:50:01 +0000 | [diff] [blame] | 40 | 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 |
rameshiyer27 | 7bfa0fd | 2024-06-11 16:51:57 +0000 | [diff] [blame] | 52 | value: {{ .Values.robot }} |
rameshiyer27 | 4f25dde | 2024-06-13 13:52:16 +0000 | [diff] [blame] | 53 | - name: TEST_ENV |
| 54 | value: "k8s" |
adheli.tavares | 80e382e | 2024-05-01 14:08:35 +0100 | [diff] [blame] | 55 | command: [ "./run-test.sh" ] |
rameshiyer27 | 6ebe5b6 | 2023-02-14 17:52:49 +0000 | [diff] [blame] | 56 | volumeMounts: |
| 57 | - name: robot-csit-pv |
| 58 | mountPath: /tmp |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame] | 59 | restartPolicy: OnFailure |
rameshiyer27 | 6ebe5b6 | 2023-02-14 17:52:49 +0000 | [diff] [blame] | 60 | volumes: |
| 61 | - name: robot-csit-pv |
| 62 | hostPath: |
rameshiyer27 | 7bfa0fd | 2024-06-11 16:51:57 +0000 | [diff] [blame] | 63 | path: {{ .Values.robotLogDir }} |