ci: log previous instance of the container in a pod

if the pod is crashed and restarted the current logs
is not helpful. Logging with `-p` might help us
to log the previous container.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-05-17 16:21:35 +05:30 committed by mergify[bot]
parent a75430ce21
commit 0cb5abc6fb

View File

@ -49,6 +49,7 @@ for POD in $(kubectl -n rook-ceph get pods -o jsonpath='{.items[0].metadata.name
do
log kubectl -n rook-ceph describe pod "${POD}"
log kubectl -n rook-ceph logs "${POD}"
log kubectl -n rook-ceph logs "${POD}" --all-containers --previous=true
done
log kubectl -n rook-ceph describe CephCluster
log kubectl -n rook-ceph describe CephBlockPool