From ae869fe16dd5be3d4562a058ee96ad449c3c7446 Mon Sep 17 00:00:00 2001 From: Gabriel Bernal Date: Fri, 29 Nov 2024 12:13:49 +0100 Subject: [PATCH] fix manifest handler path to use static path instead of config Signed-off-by: Gabriel Bernal --- pkg/manifest_handler.go | 2 +- scripts/start-console.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/manifest_handler.go b/pkg/manifest_handler.go index 344fc77..2f71963 100644 --- a/pkg/manifest_handler.go +++ b/pkg/manifest_handler.go @@ -13,7 +13,7 @@ import ( var mlog = logrus.WithField("module", "manifest") func manifestHandler(cfg *Config) http.HandlerFunc { - baseManifestData, err := os.ReadFile(filepath.Join(cfg.ConfigPath, "plugin-manifest.json")) + baseManifestData, err := os.ReadFile(filepath.Join(cfg.StaticPath, "plugin-manifest.json")) if err != nil { mlog.WithError(err).Error("cannot read base manifest file") return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/scripts/start-console.sh b/scripts/start-console.sh index 05bbd03..7500694 100755 --- a/scripts/start-console.sh +++ b/scripts/start-console.sh @@ -4,6 +4,7 @@ set -euo pipefail CONSOLE_IMAGE=${CONSOLE_IMAGE:="quay.io/openshift/origin-console:latest"} CONSOLE_PORT=${CONSOLE_PORT:=9000} +CONSOLE_IMAGE_PLATFORM=${CONSOLE_IMAGE_PLATFORM:="linux/amd64"} echo "Starting local OpenShift console..." @@ -42,6 +43,7 @@ if [ -x "$(command -v podman)" ]; then BRIDGE_PLUGINS="${npm_package_consolePlugin_name}=http://localhost:9001" podman run --pull always \ --rm --network=host \ + --platform $CONSOLE_IMAGE_PLATFORM \ --env-file <(set | grep BRIDGE) \ --env BRIDGE_PLUGIN_PROXY='{"services": [{"consoleAPIPath": "/api/proxy/plugin/distributed-tracing-console-plugin/backend/", "endpoint":"http://localhost:9002","authorize":true}, {"consoleAPIPath": "/api/plugins/distributed-tracing-console-plugin/api/v1/list-tempostacks", "endpoint":"http://localhost:9002/api/v1/list-tempostacks","authorize":true}]}' \ $CONSOLE_IMAGE @@ -49,6 +51,7 @@ if [ -x "$(command -v podman)" ]; then BRIDGE_PLUGINS="${npm_package_consolePlugin_name}=http://host.containers.internal:9001" podman run \ --pull always \ + --platform $CONSOLE_IMAGE_PLATFORM \ --rm -p "$CONSOLE_PORT":9000 \ --env-file <(set | grep BRIDGE) \ --env BRIDGE_PLUGIN_PROXY='{"services": [{"consoleAPIPath": "/api/proxy/plugin/distributed-tracing-console-plugin/backend/", "endpoint":"http://host.containers.internal:9002","authorize":true}, {"consoleAPIPath": "/api/plugins/distributed-tracing-console-plugin/api/v1/list-tempostacks", "endpoint":"http://host.containers.internal:9002/api/v1/list-tempostacks","authorize":true}]}' \ @@ -58,6 +61,7 @@ else BRIDGE_PLUGINS="${npm_package_consolePlugin_name}=http://host.docker.internal:9001" docker run \ --pull always \ + --platform $CONSOLE_IMAGE_PLATFORM \ --rm -p "$CONSOLE_PORT":9000 \ --env-file <(set | grep BRIDGE) \ --env BRIDGE_PLUGIN_PROXY='{"services": [{"consoleAPIPath": "/api/proxy/plugin/distributed-tracing-console-plugin/backend/", "endpoint":"https://host.docker.internal:9002","authorize":true},{"consoleAPIPath": "/api/plugins/distributed-tracing-console-plugin/api/v1/list-tempostacks", "endpoint":"https://host.docker.internal:9002/api/v1/list-tempostacks","authorize":true}]}' \