fix(ci): use namespace-scoped kubeconfig check, guard empty pod name #38

Merged
rock merged 1 commits from fix/ci-kubeconfig-rbac into main 2026-09-26 11:05:18 +00:00
Showing only changes of commit e4fed02809 - Show all commits
+5 -1
View File
@@ -67,7 +67,7 @@ jobs:
run: |
mkdir -p ~/.kube
echo "${KUBECONFIG_B64}" | base64 -d > ~/.kube/config
kubectl get nodes --no-headers | head -1
kubectl get namespaces --no-headers | head -1
echo '✓ kubeconfig works'
env:
KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }}
@@ -157,8 +157,12 @@ jobs:
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
POD_NAME="${{ steps.canary.outputs.pod_name }}"
if [ -n "${POD_NAME}" ]; then
kubectl delete pod "${POD_NAME}" -n api --ignore-not-found || true
echo "✓ Canary pod removed"
else
echo "⚠ No canary pod to clean up (name was empty)"
fi
- name: Gate on test result
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.tests.outputs.result != 'pass'