#!/bin/bash # Configure ProviderConfig for Crossplane # DEPLOY-018: Review and update Proxmox configuration set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" echo "=== Configuring ProviderConfig ===" echo "" # Check prerequisites if ! command -v kubectl &> /dev/null; then echo "✗ kubectl is not installed" exit 1 fi if ! kubectl cluster-info &> /dev/null; then echo "✗ Cannot connect to Kubernetes cluster" exit 1 fi # Prompt for credentials echo "Enter Proxmox credentials:" read -p "Username (default: root@pam): " USERNAME USERNAME=${USERNAME:-root@pam} read -sp "Password or API Token: " PASSWORD echo "" read -p "Instance 1 Endpoint (default: https://ml110-01.sankofa.nexus:8006): " INSTANCE1_ENDPOINT INSTANCE1_ENDPOINT=${INSTANCE1_ENDPOINT:-https://ml110-01.sankofa.nexus:8006} read -p "Instance 2 Endpoint (default: https://r630-01.sankofa.nexus:8006): " INSTANCE2_ENDPOINT INSTANCE2_ENDPOINT=${INSTANCE2_ENDPOINT:-https://r630-01.sankofa.nexus:8006} read -p "Skip TLS verification? (y/N): " SKIP_TLS SKIP_TLS=${SKIP_TLS:-N} # Create credentials JSON CREDS_JSON=$(cat <