Files
Sankofa/scripts/fix-containerd-tag.sh
defiQUG 33d50fb91e
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
chore: consolidate local WIP (repo cleanup 20260707)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:41:34 -07:00

77 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "=========================================="
echo "FIX CONTAINERD TAG - Force Latest to New Image"
echo "=========================================="
echo ""
# The new image manifest digest
NEW_DIGEST="sha256:219e9651ca232b6320614f2f2289ba4c9bf8d29809a90319038a6390871a4c26"
IMAGE_NAME="docker.io/library/crossplane-provider-proxmox"
echo "Step 1: Listing all crossplane images..."
sudo ctr -n k8s.io images ls | grep crossplane-provider-proxmox || echo " (No images found)"
echo ""
echo "Step 2: Removing ALL crossplane-provider-proxmox images..."
ALL_IMAGES=$(sudo ctr -n k8s.io images ls -q | grep "${IMAGE_NAME}" || 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 to remove)"
fi
echo ""
echo "Step 3: Re-importing fresh image..."
if [ ! -f /tmp/crossplane-fresh-nuclear.tar ]; then
echo " ❌ ERROR: Image tar not found at /tmp/crossplane-fresh-nuclear.tar"
exit 1
fi
sudo ctr -n k8s.io images import /tmp/crossplane-fresh-nuclear.tar
echo " ✅ Image imported"
echo ""
echo "Step 4: Verifying import and checking digest..."
IMPORTED=$(sudo ctr -n k8s.io images ls -q | grep "${IMAGE_NAME}:latest" || true)
if [ -z "$IMPORTED" ]; then
echo " ❌ ERROR: Image ${IMAGE_NAME}:latest not found after import!"
exit 1
fi
echo " ✅ Image found: $IMPORTED"
echo ""
echo "Step 5: Checking image digest..."
IMAGE_DIGEST=$(sudo ctr -n k8s.io images ls --format '{{.Target.Digest}}' | grep "${IMAGE_NAME}:latest" | head -1 || true)
if [ -n "$IMAGE_DIGEST" ]; then
echo " Image digest: $IMAGE_DIGEST"
if echo "$IMAGE_DIGEST" | grep -q "219e9651"; then
echo " ✅ Correct digest (new image)"
else
echo " ⚠️ Wrong digest - may still be old image"
fi
else
echo " ⚠️ Could not determine digest"
fi
echo ""
echo "Step 6: Final image list:"
sudo ctr -n k8s.io images ls | grep crossplane-provider-proxmox
echo ""
echo "=========================================="
echo "CONTAINERD TAG FIX COMPLETE"
echo "=========================================="
echo ""
echo "Now delete and recreate the pod:"
echo " kubectl delete pod -n crossplane-system -l app=crossplane-provider-proxmox"
echo " kubectl wait --for=condition=ready pod -n crossplane-system -l app=crossplane-provider-proxmox --timeout=120s"
echo ""
echo "Then verify:"
echo " kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox | grep '\[FIXED CODE\]'"