We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 048367a commit 24462bdCopy full SHA for 24462bd
resources/scripts/connect_logging.sh
@@ -1,8 +1,16 @@
1
#!/bin/bash
2
-set -e
+# NO `set -e` here so an error does not exit the script
3
4
POD_NAME=$(kubectl get pods --namespace warnet-logging -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=loki-grafana" -o jsonpath="{.items[0].metadata.name}")
5
6
echo "Go to http://localhost:3000"
7
+echo "Grafana pod name: ${POD_NAME}"
8
-kubectl --namespace warnet-logging port-forward "${POD_NAME}" 3000
9
+while true; do
10
+ echo "Attempting to start Grafana port forwarding"
11
+ kubectl --namespace warnet-logging port-forward "${POD_NAME}" 3000 2>&1
12
+ echo "Grafana port forwarding exited with status: $?"
13
+ sleep 5
14
+done;
15
+
16
+echo "warnet-logging port-forward exited"
0 commit comments