f1500ed326
The Service delete fix on this branch is correct, but the E2E workflow and scripts still defaulted to privilegedescalation-dev where the arc-runners service account has no permissions. This caused RBAC Forbidden errors instead of the original ERR_NAME_NOT_RESOLVED. Changed all defaults to headlamp-dev, matching the successful gandalf/rename-ns-headlamp-dev branch.
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# teardown-e2e-headlamp.sh
|
|
#
|
|
# Tears down the dedicated E2E Headlamp instance deployed by deploy-e2e-headlamp.sh.
|
|
#
|
|
# Environment:
|
|
# E2E_NAMESPACE — namespace to clean up (default: headlamp-dev)
|
|
# E2E_RELEASE — release/resource name prefix (default: headlamp-e2e)
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
E2E_NAMESPACE="${E2E_NAMESPACE:-headlamp-dev}"
|
|
E2E_RELEASE="${E2E_RELEASE:-headlamp-e2e}"
|
|
|
|
echo "=== E2E Headlamp Teardown ==="
|
|
echo " Namespace: $E2E_NAMESPACE"
|
|
echo " Release: $E2E_RELEASE"
|
|
|
|
echo "Removing Headlamp Deployment, Service, and ServiceAccount..."
|
|
kubectl delete deployment "${E2E_RELEASE}" -n "$E2E_NAMESPACE" --ignore-not-found
|
|
kubectl delete service "${E2E_RELEASE}" -n "$E2E_NAMESPACE" --ignore-not-found
|
|
kubectl delete serviceaccount "${E2E_RELEASE}" -n "$E2E_NAMESPACE" --ignore-not-found
|
|
|
|
echo "Cleaning up ConfigMap..."
|
|
kubectl delete configmap headlamp-intel-gpu-plugin -n "$E2E_NAMESPACE" --ignore-not-found
|
|
|
|
echo "Cleaning up test service account..."
|
|
kubectl delete serviceaccount headlamp-e2e-test -n "$E2E_NAMESPACE" --ignore-not-found
|
|
|
|
# Clean up .env.e2e if present
|
|
if [ -f "$REPO_ROOT/.env.e2e" ]; then
|
|
rm "$REPO_ROOT/.env.e2e"
|
|
echo "Removed .env.e2e"
|
|
fi
|
|
|
|
echo ""
|
|
echo "E2E teardown complete."
|