Files
Sankofa/crossplane-provider-proxmox/BUILD_AND_DEPLOY.md
defiQUG 9daf1fd378 Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution
- Enhance API schema with expanded type definitions and resolvers
- Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth
- Implement new services: AI optimization, billing, blockchain, compliance, marketplace
- Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage)
- Update Crossplane provider with enhanced VM management capabilities
- Add comprehensive test suite for API endpoints and services
- Update frontend components with improved GraphQL subscriptions and real-time updates
- Enhance security configurations and headers (CSP, CORS, etc.)
- Update documentation and configuration files
- Add new CI/CD workflows and validation scripts
- Implement design system improvements and UI enhancements
2025-12-12 18:01:35 -08:00

4.5 KiB

Build and Deploy Guide (No GitHub Required)

Overview

This guide shows how to build and deploy the Crossplane provider without using GitHub Container Registry.

Build Image

cd crossplane-provider-proxmox

# Build the Docker image
docker build -t crossplane-provider-proxmox:latest .

Load into Cluster

For kind:

kind load docker-image crossplane-provider-proxmox:latest

For minikube:

minikube image load crossplane-provider-proxmox:latest

For Docker Desktop Kubernetes:

# Image is already available, no load needed

Deploy

# Deploy the provider
kubectl apply -f config/provider.yaml

# Verify deployment
kubectl get pods -n crossplane-system

Option 2: Docker Hub (Public Registry)

Setup

  1. Create account at https://hub.docker.com
  2. Login:
    docker login
    

Build and Push

cd crossplane-provider-proxmox

# Build with Docker Hub tag
docker build -t sankofa/crossplane-provider-proxmox:latest .

# Push to Docker Hub
docker push sankofa/crossplane-provider-proxmox:latest

Update Configuration

Edit config/provider.yaml:

image: docker.io/sankofa/crossplane-provider-proxmox:latest
imagePullPolicy: Always

Deploy

kubectl apply -f config/provider.yaml

Option 3: Private Container Registry

Harbor / Private Registry

  1. Build image:

    docker build -t registry.example.com/sankofa/crossplane-provider-proxmox:latest .
    
  2. Login to registry:

    docker login registry.example.com
    
  3. Push image:

    docker push registry.example.com/sankofa/crossplane-provider-proxmox:latest
    
  4. Create image pull secret:

    kubectl create secret docker-registry regcred \
      --docker-server=registry.example.com \
      --docker-username=USERNAME \
      --docker-password=PASSWORD \
      --docker-email=EMAIL \
      -n crossplane-system
    
  5. Update provider.yaml:

    image: registry.example.com/sankofa/crossplane-provider-proxmox:latest
    imagePullPolicy: Always
    

    And add image pull secret:

    spec:
      template:
        spec:
          imagePullSecrets:
          - name: regcred
    
  6. Deploy:

    kubectl apply -f config/provider.yaml
    

Option 4: Local Registry (Docker Registry)

Setup Local Registry

# Run local registry
docker run -d -p 5000:5000 --name registry registry:2

# Build and tag
docker build -t localhost:5000/crossplane-provider-proxmox:latest .

# Push to local registry
docker push localhost:5000/crossplane-provider-proxmox:latest

Update Configuration

Edit config/provider.yaml:

image: localhost:5000/crossplane-provider-proxmox:latest
imagePullPolicy: Always

Note: For Kubernetes, use the registry's service IP or hostname, not localhost.


Option 5: Build in Cluster (Kaniko/Cloud Native Build)

For production, consider using:

  • Kaniko: Build images in Kubernetes without Docker
  • BuildKit: Cloud-native build system
  • Tekton: CI/CD pipelines with in-cluster builds

Quick Start (Local Development)

# 1. Build
cd crossplane-provider-proxmox
docker build -t crossplane-provider-proxmox:latest .

# 2. Load (if using kind/minikube)
kind load docker-image crossplane-provider-proxmox:latest
# OR
minikube image load crossplane-provider-proxmox:latest

# 3. Deploy
kubectl apply -f config/provider.yaml

# 4. Verify
kubectl get pods -n crossplane-system -l app=crossplane-provider-proxmox
kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox

Current Configuration

Image: crossplane-provider-proxmox:latest (local)
Pull Policy: IfNotPresent

This configuration works out-of-the-box for local development without requiring any external registry.


Troubleshooting

Image Pull Errors

# Check if image exists locally
docker images | grep crossplane-provider-proxmox

# For kind, verify image is loaded
docker exec -it kind-control-plane crictl images | grep crossplane

# For minikube, check images
minikube ssh docker images | grep crossplane

Build Errors

# Check Dockerfile
cat crossplane-provider-proxmox/Dockerfile

# Build with verbose output
docker build --progress=plain -t crossplane-provider-proxmox:latest .

Last Updated: Current
Registry: Local (no external registry required)