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

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-07-07 09:41:34 -07:00
parent 477cf73005
commit 33d50fb91e
277 changed files with 44421 additions and 75 deletions

124
scripts/fix-deployment-issues.sh Executable file
View File

@@ -0,0 +1,124 @@
#!/bin/bash
# Fix Deployment Issues
# Diagnoses and fixes common deployment issues
set -e
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
echo "=========================================="
echo "Fixing Deployment Issues"
echo "=========================================="
echo ""
# 1. Check connectivity
echo -e "${BLUE}1. Checking connectivity...${NC}"
if ping -c 2 192.168.11.10 &>/dev/null; then
echo -e "${GREEN}${NC} ML110-01 reachable"
else
echo -e "${RED}${NC} ML110-01 not reachable"
fi
if ping -c 2 192.168.11.11 &>/dev/null; then
echo -e "${GREEN}${NC} R630-01 reachable"
else
echo -e "${RED}${NC} R630-01 not reachable"
fi
echo ""
# 2. Check provider pod
echo -e "${BLUE}2. Checking provider pod...${NC}"
POD_STATUS=$(kubectl get pods -n crossplane-system -l app=crossplane-provider-proxmox -o jsonpath='{.items[0].status.phase}' 2>/dev/null || echo "NOT_FOUND")
if [[ "$POD_STATUS" == "Running" ]]; then
echo -e "${GREEN}${NC} Provider pod is running"
READY=$(kubectl get pods -n crossplane-system -l app=crossplane-provider-proxmox -o jsonpath='{.items[0].status.containerStatuses[0].ready}' 2>/dev/null)
if [[ "$READY" == "true" ]]; then
echo -e "${GREEN}${NC} Provider pod is ready"
else
echo -e "${YELLOW}${NC} Provider pod not ready, restarting..."
kubectl delete pod -n crossplane-system -l app=crossplane-provider-proxmox
echo "Waiting for pod to restart..."
sleep 10
fi
else
echo -e "${RED}${NC} Provider pod not running (status: $POD_STATUS)"
fi
echo ""
# 3. Check credentials
echo -e "${BLUE}3. Checking credentials...${NC}"
if kubectl get secret proxmox-credentials -n crossplane-system &>/dev/null; then
echo -e "${GREEN}${NC} Credentials secret exists"
KEYS=$(kubectl get secret proxmox-credentials -n crossplane-system -o jsonpath='{.data}' 2>/dev/null | jq -r 'keys[]' 2>/dev/null || echo "")
if [[ "$KEYS" == *"token"* && "$KEYS" == *"tokenid"* ]]; then
echo -e "${GREEN}${NC} Token format correct"
else
echo -e "${YELLOW}${NC} Credentials format may be incorrect"
fi
else
echo -e "${RED}${NC} Credentials secret not found"
fi
echo ""
# 4. Check provider config
echo -e "${BLUE}4. Checking provider config...${NC}"
if kubectl get providerconfig proxmox-provider-config -n crossplane-system &>/dev/null; then
echo -e "${GREEN}${NC} ProviderConfig exists"
SITES=$(kubectl get providerconfig proxmox-provider-config -n crossplane-system -o jsonpath='{.spec.sites[*].name}' 2>/dev/null)
if [[ "$SITES" == *"site-1"* && "$SITES" == *"site-2"* ]]; then
echo -e "${GREEN}${NC} Both sites configured"
else
echo -e "${RED}${NC} Sites not correctly configured: $SITES"
fi
else
echo -e "${RED}${NC} ProviderConfig not found"
fi
echo ""
# 5. Check VM status
echo -e "${BLUE}5. Checking VM status...${NC}"
TOTAL=$(kubectl get proxmoxvm -A --no-headers 2>&1 | wc -l)
echo "Total VMs: $TOTAL"
# Count VMs with errors
ERRORS=$(kubectl get proxmoxvm -A -o json 2>&1 | jq -r '.items[] | select(.status.conditions[]?.type=="Failed") | .metadata.name' 2>/dev/null | wc -l)
if [[ $ERRORS -gt 0 ]]; then
echo -e "${YELLOW}${NC} $ERRORS VMs with errors"
echo "Failed VMs:"
kubectl get proxmoxvm -A -o json 2>&1 | jq -r '.items[] | select(.status.conditions[]?.type=="Failed") | " - \(.metadata.name): \(.status.conditions[]? | select(.type=="Failed") | .message)"' 2>/dev/null | head -5
else
echo -e "${GREEN}${NC} No VMs with errors"
fi
echo ""
# 6. Recommendations
echo "=========================================="
echo "Recommendations"
echo "=========================================="
echo ""
if [[ $ERRORS -gt 0 ]]; then
echo "1. Check provider logs:"
echo " kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox -f"
echo ""
echo "2. Verify Proxmox API access:"
echo " Test from Kubernetes cluster to both Proxmox nodes"
echo ""
echo "3. Check credentials:"
echo " Verify token is valid for both Proxmox nodes"
echo ""
fi
echo "4. Monitor VM creation:"
echo " kubectl get proxmoxvm -A -w"
echo ""