mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
ci: use new label for snapshot controller
with new release of snapshotter the labels are changed, this commit uses the new labels to list the snapshot controller pod. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
89501a8865
commit
0a82f17671
@ -37,19 +37,19 @@ function install_snapshot_controller() {
|
|||||||
|
|
||||||
create_or_delete_resource "create" "${namespace}"
|
create_or_delete_resource "create" "${namespace}"
|
||||||
|
|
||||||
pod_ready=$(kubectl_retry get pods -l app=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
pod_ready=$(kubectl_retry get pods -l app.kubernetes.io/name=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||||
INC=0
|
INC=0
|
||||||
until [[ "${pod_ready}" == "true" || $INC -gt 20 ]]; do
|
until [[ "${pod_ready}" == "true" || $INC -gt 20 ]]; do
|
||||||
sleep 10
|
sleep 10
|
||||||
((++INC))
|
((++INC))
|
||||||
pod_ready=$(kubectl_retry get pods -l app=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
pod_ready=$(kubectl_retry get pods -l app.kubernetes.io/name=snapshot-controller -n "${namespace}" -o jsonpath='{.items[0].status.containerStatuses[0].ready}')
|
||||||
echo "snapshotter pod status: ${pod_ready}"
|
echo "snapshotter pod status: ${pod_ready}"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "${pod_ready}" != "true" ]; then
|
if [ "${pod_ready}" != "true" ]; then
|
||||||
echo "snapshotter controller creation failed"
|
echo "snapshotter controller creation failed"
|
||||||
kubectl_retry get pods -l app=snapshot-controller -n "${namespace}"
|
kubectl_retry get pods -l app.kubernetes.io/name=snapshot-controller -n "${namespace}"
|
||||||
kubectl_retry describe po -l app=snapshot-controller -n "${namespace}"
|
kubectl_retry describe po -l app.kubernetes.io/name=snapshot-controller -n "${namespace}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user