Co-authored-by: Cursor <cursoragent@cursor.com>
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 operationsResourceDiscovery- 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:
ProxmoxVMCRD: ✅ InstalledProviderConfigCRD: ✅ InstalledProxmoxVMScaleSetCRD: ❌ MissingResourceDiscoveryCRD: ❌ Missing
Recommended Fixes
Option 1: Generate and Install Missing CRDs (Recommended if features are needed)
If you plan to use VM scaling or resource discovery features:
-
Generate CRDs:
cd crossplane-provider-proxmox make manifests # or controller-gen crd paths=./apis/... output:crd:artifacts:config=config/crd/bases -
Install CRDs:
kubectl apply -f crossplane-provider-proxmox/config/crd/bases/ -
Verify:
kubectl get crd | grep proxmox # Should show all 4 CRDs
Option 2: Make Controller Registration Conditional (Recommended if features are not needed)
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 |
Recommended Action
Immediate Action (Choose One)
- If you need scaling/discovery features: Generate and install missing CRDs
- If you don't need these features: Accept log noise or modify code to make controllers conditional
- 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