Files
Sankofa/docs/proxmox/WARNINGS_AND_FIXES.md
T
2026-07-07 09:41:34 -07:00

5.4 KiB

Provider Warnings and Recommended Fixes

Date: 2025-12-13
Status: ⚠️ WARNINGS IDENTIFIED - FIXES RECOMMENDED


Issue Summary

The provider is logging repeated errors about missing CRDs. While these don't prevent basic VM operations, they create log noise and indicate incomplete configuration.


Identified Issues

⚠️ Issue 1: Missing CRDs for Optional Controllers

Error Messages (repeating every 10 seconds):

ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start
{"kind": "ProxmoxVMScaleSet.proxmox.sankofa.nexus", "error": "no matches for kind \"ProxmoxVMScaleSet\" in version \"proxmox.sankofa.nexus/v1alpha1\""}

ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start
{"kind": "ResourceDiscovery.proxmox.sankofa.nexus", "error": "no matches for kind \"ResourceDiscovery\" in version \"proxmox.sankofa.nexus/v1alpha1\""}

Root Cause:

  • The provider code (cmd/provider/main.go) unconditionally registers controllers for:
    • ProxmoxVMScaleSet - For VM scaling operations
    • ResourceDiscovery - For resource discovery operations
  • These CRDs are not installed in the cluster
  • Controller-runtime tries to watch these resources and fails repeatedly

Impact:

  • ⚠️ Log Noise: Errors logged every 10 seconds
  • ⚠️ Resource Waste: Continuous retry attempts
  • Functionality: Basic VM operations still work (ProxmoxVM CRD is installed)

Current Status:

  • ProxmoxVM CRD: Installed
  • ProviderConfig CRD: Installed
  • ProxmoxVMScaleSet CRD: Missing
  • ResourceDiscovery CRD: Missing

If you plan to use VM scaling or resource discovery features:

  1. Generate CRDs:

    cd crossplane-provider-proxmox
    make manifests  # or controller-gen crd paths=./apis/... output:crd:artifacts:config=config/crd/bases
    
  2. Install CRDs:

    kubectl apply -f crossplane-provider-proxmox/config/crd/bases/
    
  3. Verify:

    kubectl get crd | grep proxmox
    # Should show all 4 CRDs
    

Modify cmd/provider/main.go to only register controllers if CRDs exist:

// Check if CRD exists before registering controller
if crdExists("proxmoxvmscalesets.proxmox.sankofa.nexus") {
    if err = (&vmscaleset.ProxmoxVMScaleSetReconciler{
        Client: mgr.GetClient(),
        Scheme: mgr.GetScheme(),
    }).SetupWithManager(mgr); err != nil {
        setupLog.Error(err, "unable to create controller", "controller", "ProxmoxVMScaleSet")
        os.Exit(1)
    }
}

Note: This requires code changes and rebuilding the provider.

Option 3: Suppress Errors (Temporary workaround)

If these features are not needed, you can:

  • Filter logs to ignore these specific errors
  • Accept the log noise (doesn't affect functionality)

Verification

Check Current CRDs

kubectl get crd | grep proxmox

Expected Output (if all CRDs installed):

proxmoxvms.proxmox.sankofa.nexus
proxmoxvmscalesets.proxmox.sankofa.nexus
providerconfigs.proxmox.sankofa.nexus
resourcediscoveries.proxmox.sankofa.nexus

Current Output:

proxmoxvms.proxmox.sankofa.nexus
providerconfigs.proxmox.sankofa.nexus

Check Provider Logs

kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox --tail=50 | grep -i error

After Fix: Should show no CRD-related errors.


Impact Assessment

Current Impact

Aspect Impact Severity
VM Operations Working None
Log Noise ⚠️ High Low
Resource Usage ⚠️ Minor Low
Functionality Full None

After Fix

Aspect Impact Severity
VM Operations Working None
Log Noise Clean None
Resource Usage Optimal None
Functionality Full None

Immediate Action (Choose One)

  1. If you need scaling/discovery features: Generate and install missing CRDs
  2. If you don't need these features: Accept log noise or modify code to make controllers conditional
  3. For production: Fix the code to make controller registration conditional

Priority

  • For Development/Testing: Low priority (can be ignored)
  • For Production: Medium priority (should be fixed to reduce log noise)

Additional Notes

Why This Happens

The provider was designed with multiple controllers, but:

  • Not all CRDs were generated/installed
  • Controller registration is unconditional
  • Controller-runtime requires CRDs to exist before watching

Best Practice

For production deployments:

  • Only register controllers for installed CRDs
  • Use feature flags or conditional registration
  • Generate all CRDs during build process

Conclusion

Status: ⚠️ Warnings present but non-critical

  • Basic VM operations work correctly
  • Log noise can be reduced by installing missing CRDs or modifying code
  • No functional impact on current deployment

Recommendation: Fix before production deployment to reduce log noise and ensure clean operation.


Last Updated: 2025-12-13
Status: ⚠️ WARNINGS IDENTIFIED - FIXES AVAILABLE