From 2dc4267d434c56ecbeeea3d9df0c68af9d2056e4 Mon Sep 17 00:00:00 2001 From: Snir Sheriber Date: Wed, 18 Sep 2024 17:29:05 +0300 Subject: [PATCH] hack: allow pp-cm-helper.sh to restart DS --- hack/pp-cm-helper.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/pp-cm-helper.sh b/hack/pp-cm-helper.sh index 0036a8ad..5f8e5ed7 100755 --- a/hack/pp-cm-helper.sh +++ b/hack/pp-cm-helper.sh @@ -158,8 +158,12 @@ function applyCM() { echo "Waiting for ConfigMap to be created..." sleep 1 done - echo && echo "###### Done" ${CLI} get cm peer-pods-cm -n openshift-sandboxed-containers-operator -o jsonpath='{.data}' | jq + if ${CLI} get ds/peerpodconfig-ctrl-caa-daemon -n openshift-sandboxed-containers-operator > /dev/null 2>&1; then + [[ -n $YES ]] || (read -r -p "Restart DeamonSet so that CM will be taken into account? [y/N] " && [[ "$REPLY" =~ ^[Yy]$ ]]) || exit 0 + ${CLI} set env ds/peerpodconfig-ctrl-caa-daemon -n openshift-sandboxed-containers-operator REBOOT="$(date)" + fi + echo && echo "###### Done" } function initialization() {