When enabled, a background task runs periodically (every hour) to detect and clean up
orphaned VMs - virtual machines that exist in Kubernetes but have no corresponding
registered agent in Jenkins.
Why orphaned VMs occur:
- Agent registration failed after VM creation
- Jenkins crashed or restarted during provisioning
- Network issues prevented proper cleanup
- The agent termination callback failed to delete the VM
How it works:
- Compares VMs in Kubernetes (by cloud label) against registered Jenkins agents
- Uses each template's "Orphan Grace Period" to avoid deleting VMs still starting up
- Only deletes VMs that have no agent and are older than the grace period
When to disable:
- If you manage VM lifecycle externally
- If you have VMs with the plugin's labels that should not be auto-deleted
- For debugging provisioning issues (to prevent VMs from being cleaned up)
Default: Enabled