You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR makes the output of the `blackbox-exporter` launcher script
output a clickable link in the style of the `cluster-console` script.
Signed-off-by: Chris Collins <[email protected]>
echo"Starting blackbox exporter on port $OCM_BACKPLANE_CONSOLE_PORT helping to identify the source of api-ErrorBudgetBurn..."| sed "s/${OCM_BACKPLANE_CONSOLE_PORT}/$(cat /tmp/portmap)/"
2
+
3
+
if [ "${OCMC_ENGINE}"!="podman" ]
4
+
then
5
+
echo"Blackbox exporter inside OCM Container is currently only supported with Podman"
6
+
exit 1
7
+
fi
8
+
9
+
if [ "${OCMC_DISABLE_CONSOLE_PORT}"=="true " ]
10
+
then
11
+
echo"Cluster console port (used by blackbox-exporter) disabled: OCMC_DISABLE_CONSOLE_PORT == true"
12
+
exit 1
13
+
fi
14
+
15
+
# if the file doesn't exist, or is empty, exit
16
+
if [ !-f /tmp/portmap ] || [ !-s /tmp/portmap ]
17
+
then
18
+
echo"External port not mapped for cluster console (used by blackbox-exporter), exiting..."
19
+
exit 1
20
+
fi
21
+
22
+
3
23
oc port-forward \
4
24
--address 0.0.0.0 \
5
25
-n openshift-route-monitor-operator \
6
26
deployment/blackbox-exporter \
7
-
$OCM_BACKPLANE_CONSOLE_PORT:9115 | sed "s/${OCM_BACKPLANE_CONSOLE_PORT}/$(cat /tmp/portmap)/"
27
+
$OCM_BACKPLANE_CONSOLE_PORT:9115 \
28
+
| sed "s|^Forwarding.*|== Blackbox exporter is available at http://0.0.0.0:$(cat /tmp/portmap) ==|"
0 commit comments