chore: consolidate local WIP (repo cleanup 20260707)
Some checks failed
API CI / API Lint (push) Successful in 47s
API CI / API Type Check (push) Failing after 47s
API CI / API Test (push) Successful in 1m0s
API CI / API Build (push) Failing after 50s
API CI / Build Docker Image (push) Has been skipped
Build Crossplane Provider / build (push) Failing after 5m51s
CD Pipeline / Deploy to Staging (push) Failing after 29s
CI Pipeline / Lint and Type Check (push) Failing after 36s
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Test Backend (push) Failing after 1m33s
CI Pipeline / Test Frontend (push) Failing after 30s
CI Pipeline / Security Scan (push) Failing after 1m16s
Crossplane Provider CI / Go Test (push) Failing after 3m23s
Crossplane Provider CI / Go Lint (push) Failing after 7m27s
Crossplane Provider CI / Go Build (push) Failing after 3m27s
Deploy to Staging / Deploy to Staging (push) Failing after 30s
Portal CI / Portal Lint (push) Failing after 21s
Portal CI / Portal Type Check (push) Failing after 21s
Portal CI / Portal Test (push) Failing after 21s
Portal CI / Portal Build (push) Failing after 22s
Test Suite / frontend-tests (push) Failing after 30s
Test Suite / api-tests (push) Failing after 49s
Test Suite / blockchain-tests (push) Failing after 30s
Type Check / type-check (map[directory:. name:root]) (push) Failing after 23s
Type Check / type-check (map[directory:api name:api]) (push) Failing after 21s
Type Check / type-check (map[directory:portal name:portal]) (push) Failing after 19s
Validate Configuration Files / validate (push) Failing after 1m52s
CD Pipeline / Deploy to Production (push) Has been skipped
Some checks failed
API CI / API Lint (push) Successful in 47s
API CI / API Type Check (push) Failing after 47s
API CI / API Test (push) Successful in 1m0s
API CI / API Build (push) Failing after 50s
API CI / Build Docker Image (push) Has been skipped
Build Crossplane Provider / build (push) Failing after 5m51s
CD Pipeline / Deploy to Staging (push) Failing after 29s
CI Pipeline / Lint and Type Check (push) Failing after 36s
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Test Backend (push) Failing after 1m33s
CI Pipeline / Test Frontend (push) Failing after 30s
CI Pipeline / Security Scan (push) Failing after 1m16s
Crossplane Provider CI / Go Test (push) Failing after 3m23s
Crossplane Provider CI / Go Lint (push) Failing after 7m27s
Crossplane Provider CI / Go Build (push) Failing after 3m27s
Deploy to Staging / Deploy to Staging (push) Failing after 30s
Portal CI / Portal Lint (push) Failing after 21s
Portal CI / Portal Type Check (push) Failing after 21s
Portal CI / Portal Test (push) Failing after 21s
Portal CI / Portal Build (push) Failing after 22s
Test Suite / frontend-tests (push) Failing after 30s
Test Suite / api-tests (push) Failing after 49s
Test Suite / blockchain-tests (push) Failing after 30s
Type Check / type-check (map[directory:. name:root]) (push) Failing after 23s
Type Check / type-check (map[directory:api name:api]) (push) Failing after 21s
Type Check / type-check (map[directory:portal name:portal]) (push) Failing after 19s
Validate Configuration Files / validate (push) Failing after 1m52s
CD Pipeline / Deploy to Production (push) Has been skipped
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
105
scripts/complete-image-fix.sh
Executable file
105
scripts/complete-image-fix.sh
Executable file
@@ -0,0 +1,105 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "=========================================="
|
||||
echo "COMPLETE IMAGE FIX - Full Cleanup & Rebuild"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Step 1: Delete deployment
|
||||
echo "Step 1: Deleting deployment..."
|
||||
kubectl delete deployment crossplane-provider-proxmox -n crossplane-system 2>/dev/null || echo " (Deployment not found)"
|
||||
sleep 3
|
||||
|
||||
# Step 2: Remove ALL crossplane-provider-proxmox images from containerd
|
||||
echo ""
|
||||
echo "Step 2: Removing ALL crossplane-provider-proxmox images from containerd..."
|
||||
ALL_IMAGES=$(sudo ctr -n k8s.io images ls -q | grep crossplane-provider-proxmox || true)
|
||||
if [ -n "$ALL_IMAGES" ]; then
|
||||
echo "$ALL_IMAGES" | while read -r img; do
|
||||
echo " Removing: $img"
|
||||
sudo ctr -n k8s.io images rm "$img" 2>/dev/null || true
|
||||
done
|
||||
echo " ✅ All images removed"
|
||||
else
|
||||
echo " (No images found)"
|
||||
fi
|
||||
|
||||
# Step 3: Verify image tar exists
|
||||
echo ""
|
||||
echo "Step 3: Verifying image tar exists..."
|
||||
if [ ! -f /tmp/crossplane-fresh-nuclear.tar ]; then
|
||||
echo " ❌ ERROR: Image tar not found at /tmp/crossplane-fresh-nuclear.tar"
|
||||
echo " Please rebuild the image first using:"
|
||||
echo " sudo /home/intlc/projects/Sankofa/scripts/nuclear-cleanup-rebuild.sh"
|
||||
exit 1
|
||||
fi
|
||||
echo " ✅ Image tar found"
|
||||
|
||||
# Step 4: Re-import fresh image
|
||||
echo ""
|
||||
echo "Step 4: Re-importing fresh image..."
|
||||
sudo ctr -n k8s.io images import /tmp/crossplane-fresh-nuclear.tar
|
||||
echo " ✅ Image imported"
|
||||
|
||||
# Step 5: Verify import
|
||||
echo ""
|
||||
echo "Step 5: Verifying import..."
|
||||
IMPORTED=$(sudo ctr -n k8s.io images ls -q | grep "crossplane-provider-proxmox:latest" || true)
|
||||
if [ -z "$IMPORTED" ]; then
|
||||
echo " ❌ ERROR: Image not found after import!"
|
||||
exit 1
|
||||
fi
|
||||
echo " ✅ Image verified: $IMPORTED"
|
||||
|
||||
# Step 6: Show image details
|
||||
echo ""
|
||||
echo "Step 6: Image details:"
|
||||
sudo ctr -n k8s.io images ls | grep crossplane-provider-proxmox
|
||||
|
||||
# Step 7: Recreate deployment
|
||||
echo ""
|
||||
echo "Step 7: Recreating deployment..."
|
||||
kubectl apply -f /home/intlc/projects/Sankofa/crossplane-provider-proxmox/config/provider.yaml
|
||||
|
||||
# Step 8: Wait for pod
|
||||
echo ""
|
||||
echo "Step 8: Waiting for pod to be ready..."
|
||||
kubectl wait --for=condition=ready pod -n crossplane-system -l app=crossplane-provider-proxmox --timeout=120s || {
|
||||
echo " ⚠️ Pod not ready within timeout, checking status..."
|
||||
kubectl get pod -n crossplane-system -l app=crossplane-provider-proxmox
|
||||
exit 1
|
||||
}
|
||||
echo " ✅ Pod is ready"
|
||||
|
||||
# Step 9: Check image ID
|
||||
echo ""
|
||||
echo "Step 9: Checking pod image ID..."
|
||||
POD_IMAGE_ID=$(kubectl get pod -n crossplane-system -l app=crossplane-provider-proxmox -o jsonpath='{.items[0].status.containerStatuses[0].imageID}')
|
||||
echo " Pod image ID: $POD_IMAGE_ID"
|
||||
|
||||
# Step 10: Wait a moment for logs
|
||||
echo ""
|
||||
echo "Step 10: Waiting for logs to generate..."
|
||||
sleep 5
|
||||
|
||||
# Step 11: Check for [FIXED CODE] message
|
||||
echo ""
|
||||
echo "Step 11: Checking for [FIXED CODE] message in logs..."
|
||||
if kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox --tail=50 | grep -q '\[FIXED CODE\]'; then
|
||||
echo " ✅ [FIXED CODE] message found! Fix is active."
|
||||
else
|
||||
echo " ⚠️ [FIXED CODE] message NOT found. Checking logs..."
|
||||
kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox --tail=20 | grep -E "Cookie|Authorization|FIXED" || echo " (No relevant log lines found)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
echo "COMPLETE IMAGE FIX FINISHED"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
echo "To verify the fix is working, check logs:"
|
||||
echo " kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox | grep '\[FIXED CODE\]'"
|
||||
echo ""
|
||||
echo "The Cookie header should be removed from requests when using token auth."
|
||||
|
||||
Reference in New Issue
Block a user