Moving dev back to LF Gerrit
[it/dep.git] / ric-aux / 80-Auxiliary-Functions / helm / mc-stack / charts / elasticsearch / examples / default / rolling_upgrade.sh
diff --git a/ric-aux/80-Auxiliary-Functions/helm/mc-stack/charts/elasticsearch/examples/default/rolling_upgrade.sh b/ric-aux/80-Auxiliary-Functions/helm/mc-stack/charts/elasticsearch/examples/default/rolling_upgrade.sh
new file mode 100755 (executable)
index 0000000..c5a2a88
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash -x
+
+kubectl proxy || true &
+
+make &
+PROC_ID=$!
+
+while kill -0 "$PROC_ID" >/dev/null 2>&1; do
+    echo "PROCESS IS RUNNING"
+    if curl --fail 'http://localhost:8001/api/v1/proxy/namespaces/default/services/elasticsearch-master:9200/_search' ; then
+        echo "cluster is healthy"
+    else
+        echo "cluster not healthy!"
+        exit 1
+    fi
+    sleep 1
+done
+echo "PROCESS TERMINATED"
+exit 0