fix(e2e): use NodePort instead of cluster-internal DNS for HEADLAMP_URL

Previous attempt used kubectl port-forward to a Service, which failed
with 'connection refused' — the API server could not reach pod IPs.

Switch to NodePort (30080) service type and use the node's InternalIP
for HEADLAMP_URL, reachable from the GitHub Actions runner pod.

- Change Service type from ClusterIP to NodePort with nodePort: 30080
- After rollout, get node InternalIP via kubectl get nodes
- Poll http://<node-ip>:30080 until reachable
- Write HEADLAMP_URL=http://<node-ip>:30080 to .env.e2e
- Remove port-forward leftover cleanup from teardown script

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-05 17:10:54 +00:00
committed by Gandalf the Greybeard [agent]
parent f1dd09c155
commit 9cc1ca7b91
2 changed files with 18 additions and 21 deletions
+1 -6
View File
@@ -22,14 +22,9 @@ echo "Cleaning up test service account..."
kubectl delete serviceaccount headlamp-e2e-test -n "$E2E_NAMESPACE" --ignore-not-found
if [ -f "$REPO_ROOT/.env.e2e" ]; then
rm "$REPO_ROOT/.env.e2e"
rm -f "$REPO_ROOT/.env.e2e"
echo "Removed .env.e2e"
fi
echo "Killing any kubectl port-forward processes for ${E2E_RELEASE}..."
pkill -f "kubectl port-forward.*${E2E_RELEASE}" 2>/dev/null || true
rm -f "$REPO_ROOT/.port-forward.log"
echo ""
echo "E2E teardown complete."