mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-09-19 23:19:52 +00:00
6a631e61cb
By using a template, it becomes possible to identify the Pod that has been started by the Batch Job. This prevents the script from getting the logs from an incorrect (old) container. Fixes: #1111 Signed-off-by: Niels de Vos <ndevos@redhat.com>
36 lines
869 B
YAML
36 lines
869 B
YAML
---
|
|
kind: Template
|
|
apiVersion: v1
|
|
metadata:
|
|
name: jjb-validate
|
|
objects:
|
|
- apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
labels:
|
|
app: jjb-validate
|
|
jjb/session: "${SESSION}"
|
|
name: jjb-validate
|
|
spec:
|
|
ttlSecondsAfterFinished: 0
|
|
backoffLimit: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: jjb-validate
|
|
jjb/session: "${SESSION}"
|
|
spec:
|
|
containers:
|
|
- name: jjb-validate
|
|
image: 172.30.254.79:5000/ceph-csi/jjb:latest
|
|
env:
|
|
- name: GIT_REPO
|
|
value: https://github.com/ceph/ceph-csi
|
|
- name: GIT_REF
|
|
value: ci/centos
|
|
restartPolicy: Never
|
|
parameters:
|
|
- name: SESSION
|
|
description: unique ID for the session to track the pod for the job
|
|
required: true
|