From 0a82f176718a6f66b20b5da6540d80a63eb45d2b Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 15 Feb 2024 13:51:12 +0100 Subject: [PATCH] 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 --- scripts/install-snapshot.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install-snapshot.sh b/scripts/install-snapshot.sh index 20b57596f..2f0b12b5d 100755 --- a/scripts/install-snapshot.sh +++ b/scripts/install-snapshot.sh @@ -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