From a383d32176f0db7d079ac1a208bcabc90140605f Mon Sep 17 00:00:00 2001 From: Gandalf the Greybeard Date: Mon, 16 Mar 2026 10:51:51 +0000 Subject: [PATCH] fix: flatten dist/ contents into plugin root during init container extraction The init container extracted the tarball preserving the dist/ subdirectory, placing main.js at /plugins/polaris/dist/main.js instead of /plugins/polaris/main.js where Headlamp expects it. Add cp -a dist/* . && rm -rf dist after extraction to flatten the build output into the plugin root directory. Fixes 6/16 E2E test failures (settings + badge navigation timeouts). Co-Authored-By: Paperclip --- scripts/deploy-plugin-to-headlamp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deploy-plugin-to-headlamp.sh b/scripts/deploy-plugin-to-headlamp.sh index 3d2d862..b87482f 100755 --- a/scripts/deploy-plugin-to-headlamp.sh +++ b/scripts/deploy-plugin-to-headlamp.sh @@ -83,7 +83,7 @@ kubectl patch deployment "$HEADLAMP_DEPLOY" -n "$HEADLAMP_NS" --type=strategic - "image": "busybox:latest", "command": [ "sh", "-c", - "mkdir -p /plugins/${PLUGIN_NAME} && cd /plugins/${PLUGIN_NAME} && tar xzf /plugin-src/plugin.tar.gz && echo 'Plugin extracted successfully' && ls -la" + "mkdir -p /plugins/${PLUGIN_NAME} && cd /plugins/${PLUGIN_NAME} && tar xzf /plugin-src/plugin.tar.gz && cp -a dist/* . && rm -rf dist && echo 'Plugin extracted successfully' && ls -la" ], "volumeMounts": [ {"name": "static-plugins", "mountPath": "/plugins"},