Skip to content

Commit

Permalink
ci: use new label for snapshot controller
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Madhu-1 committed Feb 15, 2024
1 parent 18ec0b9 commit eaf5d18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/install-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ function install_snapshot_controller() {

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
until [[ "${pod_ready}" == "true" || $INC -gt 20 ]]; do
sleep 10
((++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}"
done

if [ "${pod_ready}" != "true" ]; then
echo "snapshotter controller creation failed"
kubectl_retry get pods -l app=snapshot-controller -n "${namespace}"
kubectl_retry describe po -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.kubernetes.io/name=snapshot-controller -n "${namespace}"
exit 1
fi

Expand Down

0 comments on commit eaf5d18

Please sign in to comment.